Skip to content

masaun/ocean-datatoken-yield-farming

Repository files navigation

Ocean DataToken Yield Farming


【Introduction of the Ocean DataToken Yield Farming】

  • This is a smart contract for ocean's data-token yield farming by using liquidity mining approach.

 


【Workflow】

  • ① Create a Balancer-Pool between Ocean and DataToken. (Add Liquidity)
  • ② Receive BPTs=Balance Pool Tokens (Ocean-DataToken) and the Ocean LP Tokens (OLP) when add liquidity into a Balancer-Pool (Ocean-DataToken).
    • Ocean LP Tokens (OLP) represents BPTs=Balance Pool Tokens (Ocean-DataToken) when an user stake (Step③).
    • Received-Ocean LP Tokens (OLP) amount is same amount with received-BPTs amount.
  • ③ Stake Ocean LP Tokens (OLP) into the Ocean Farming Pool contract.
  • ④ Smart contract (the Ocean Farming Pool contract) automatically generate rewards per block.
    • The Ocean Governance Token (OGC) is generated as rewards.
    • Staker can receive rewards ( Ocean Governance Token (OGC) ) depends on their share of pool and staked-period (blocks) when they claim rewards.
  • ⑤ Claim rewards and distributes rewards into claimed-staker. (or, Un-Stake BPTs (Ocean-DataToken). At that time, claiming rewards will be executed at the same time)

 

【Diagram】Ocean DataToken Yield Farming

【Diagram】Ocean DataToken Yield Farming

 


【Remarks】

  • Version
    • Solidity (Solc): v0.5.7
    • openzeppelin-solidity: v2.4.0

 


【Setup】

① Install modules

$ npm install

② Compile & migrate contracts (on local)

$ npm run migrate:local

③ Test (Mainnet-fork approach)

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

  • 2: Execute test of the balancer-related contract (on the local) (BPool and BToken)
$ npm run test:balancer
($ truffle test ./test/test-local/ocean-v3/unit/balancer/*)

  • 3: Execute test of the Ocean Farming Pool contract (on the local)
【Ocean Farming Pool】
$ npm run test
($ truffle test ./test/test-local/OceanFarmingToken.test.js)
($ truffle test ./test/test-local/OceanGovernanceToken.test.js)


$ npm run test:farming
($ truffle test ./test/test-local/OceanFarmingPool.test.js)


【Remaining tasks and next steps】

  • Additional implementation of the Ocean Governance Token (OGC) and governance structures (e.g. Community voting function by OGC token holders)
  • Add liquidity pool (balancer pool) for the Ocean Governance Token (OGC).
  • Implement the front-end (UI).

 


【References】




About

This is a smart contract for ocean's data-token yield farming by using liquidity mining approach.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published