I propose creating an open-source library of audited smart contracts on NEAR - provided to the community for free.
Budget: 1 Million $NEAR
Who am I?
I’m Peter, the co-founder of Flux Protocol and one of the first founders to build on NEAR before testnet was live.
As a founder building on any new layer one, you face a chicken and the egg dilemma. Any DeFi lego that you would like to utilize within your product, you probably have to build yourself. At Flux, we open-sourced a flurry of repos which included the first NEAR native AMM optimized for prediction markets, the first indexer to allow frontends to display NEAR state, the first Oracle contracts, worked on the first token standards, and much more.
Why is this important?
In light of the recent Ref Finance Exploit, it’s clear the NEAR community must perform a deeper dive on core NEAR infrastructure like AMMs, Lending, Stablecoins, Oracles, Etc.
For developer adoption to go parabolic, we must invest in creating robust smart contract infrastructure developers can mix and match to create entirely new, innovative products on NEAR.
How should this work?
This DAO should contract RUST engineers that are familiar or built out NEAR core to perform audits of existing smart contracts and even build out missing contracts that would benefit NEAR’s core DeFi ecosystem.
Why not use existing smart contract audit companies?
RUST is a relatively new language when it comes to smart contract development. Many top audit firms have proficiency in Solidity, which means they can quickly identify common bugs and have had years to study and learn/create best practices.
However, NEAR is a new infrastructure – when we contracted a top audit firm to do a security review of our AMM, there were still a dozen critical bugs that we uncovered after receiving the high-level “green light.”
A similar experience happened with the NEAR Rainbow Bridge - NEAR Core engineers identified countless critical bugs after a few audit firms gave their stamp of approval.
NEAR core engineers will do a better job identifying bugs and creating best practices.
What contracts are a priority?
Any existing project building one of these use cases and would like to be the default for this audit must have their code open-source. The goal is not to have customized contracts or logic, just a stable base for developers to start.
Simple AMM
- REF Finance can become the standard
Lending
- A Compound Finance or Aave fork built in Rust
Stablecoin
- A simple Maker Style stable coin with a standard collateralization ratio that utilizes NEAR, USDC, DAI as the underlying assets
NFT marketplace
- An OpeaSea fork to facilitate simple ERC721 swaps (could be Mintbase or Paras for this audit)
Oracle
- Flux Protocol can become the standard
Prediction Markets/Derivatives
- Pulse can become the standard
How should this be displayed?
NEAR should market this library through its official channels and website, fully community-owned and curated. The DAO should vote to decide which new contracts are audited and added to the library. This library can have a documentation page on Gitbook with instructions on utilizing and deploying smart contracts.
How should this receive funding?
Initial funding should come from NEAR Foundation and initial donations from founders and community members.
Proposal:
There are six core DeFi primitives which are vital to replicate a flourishing DeFi Ecosystem on NEAR. Of those six, three already exist and are ready for an audit. For the existing code, I would propose a budget of $125k per project for audits. Projects not yet created on NEAR should receive $100k to seed the project’s development and an additional $125kk to audit the projects after completion.
The proposal will also include an amount to serve as a base foundation to begin auditing new primitives deemed to be beneficial to NEAR, also outside of DeFi.
Budget:
I propose initial funding of 1 million $NEAR to thoroughly audit the initial scope of contracts and provide a sufficient budget for the immediate future.
Future Funding
Projects that receive a free audit are encouraged to donate a portion of their native token (if applicable) to fund future open-source initiatives within the NEAR ecosystem.
If you would like to chat with me directly about this, feel free to send me a message @realpeter on telegram.