- This is a smart contract for ocean's data-token yield farming by using liquidity mining approach.
- ① Create a Balancer-Pool between Ocean and DataToken. (Add Liquidity)
- ② Receive
BPTs=Balance Pool Tokens (Ocean-DataToken)
and theOcean LP Tokens (OLP)
when add liquidity into a Balancer-Pool (Ocean-DataToken).Ocean LP Tokens (OLP)
representsBPTs=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 theOcean 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.
- The
- ⑤ 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)
- Version
- Solidity (Solc): v0.5.7
- openzeppelin-solidity: v2.4.0
$ npm install
$ npm run migrate:local
- 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)
- 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).
- Ocean Protocol
- Ocean V3 smart contract
https://github.com/oceanprotocol/contracts - Ocean V3 Document
- dApp (Ocean Market): https://market.oceanprotocol.com/
- Website (Earn): https://oceanprotocol.com/earn
- Ocean Data Economic Challenge 2020
- Ocean V3 smart contract
- Balancer
- BPT (Balancer Pool Token): https://docs.balancer.finance/core-concepts/protocol/pool-lifecycle#bpts
- BAT (Balance Governance Token): https://docs.balancer.finance/core-concepts/bal-balancer-governance-token
- Interfaces: https://docs.balancer.finance/smart-contracts/interfaces
- SushiSwap contract: https://github.com/sushiswap/sushiswap
- Benchmark protocol contract: https://github.com/benchmarkprotocol
- Truffle test
- Mainnet-fork approach with Ganache-CLI and Infura
https://medium.com/@samajammin/how-to-interact-with-ethereums-mainnet-in-a-development-environment-with-ganache-3d8649df0876
(Current block number @ mainnet: https://etherscan.io/blocks )
- Mainnet-fork approach with Ganache-CLI and Infura