masaun / autonomous-degenVC-v2

The Autonomous Degen.VC V2 is a smart contract that enables a project to launch on Degen VC without permission.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Autonomous Degen.VC

【Introduction of the Autonomous Degen.VC】

  • This is a smart contract that enables a project to launch on Degen VC without our permission.
    • For example, by calling a public function on a smart contract a project could allocate project tokens to a liquid vault (just an address that needs to be defined), a dev wallet (just an address that needs to be defined), and the DGVC LP.
    • When the function is called the DGVC token UNI-V2 LP will consist of a number of wallets with LP token balances.
    • We want the tokens allocated for distribution to the DGVC LP to become available for LP token hodlers to claim in proportion to their share of the LP.

 


【Workflow】

  • Launch a project on Degen.VC with 5 steps:
    • ① Create a Project Token
    • ② Create a Liquid Vault
    • ③ A uniswap market is created for the new project.
    • ⑤ A Liquid Vault is capitalized (topped up) with project tokens.
    • ⑥ A user purchase LP tokens by sending ETH fee required.
    • ⑦ After some period from purchased LP, a user claim LP tokens + receive some rewards (project tokens)

  • Diagram of workflow
    【Diagram】Autonomous Degen VC v2

 


【Remarks】

  • Version for following the Degen.VC smart contract
    • Solidity (Solc): v0.7.4
    • Truffle: v5.1.60
    • web3.js: v1.2.9
    • @openzeppelin/contracts: v3.4.1
    • ganache-cli: v6.9.1 (ganache-core: 2.10.2)

 


【Setup】

① Install modules

  • Install npm modules in the root directory
$ npm install

② Compile & migrate contracts (on local)

$ npm run migrate:local

③ Test (Mainnet-fork approach)

  • 1: Start ganache-cli with mainnet-fork
$ ganache-cli -d --fork https://mainnet.infura.io/v3/{YOUR INFURA KEY}@{BLOCK_NUMBER}

(※ -d option is the option in order to be able to use same address on Ganache-CLI every time)


  • 2: Execute test of the smart-contracts (on the local)
    • Test for the contract $ npm run test:AutonomousDegenVC ($ truffle test ./test/test-local/AutonomousDegenVC.test.js)


【References】


About

The Autonomous Degen.VC V2 is a smart contract that enables a project to launch on Degen VC without permission.


Languages

Language:Solidity 60.2%Language:JavaScript 39.1%Language:Shell 0.8%