masaun / lido-stETH-as-yield-source

This is a smart contract that can utilize Lido's stETH as a yield source of PoolTogetheršŸŽ«šŸŽŸ

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Lido's stETH as a yield source of PoolTogetheršŸŽ«šŸŽŸ

怐Introduction of the Lido's stETH as a yield source of PoolTogether怑

  • This is a smart contract that can utilize Lido's stETH as a yield source of PoolTogether.
    • Currently, several interest-bearing tokens such as Compound Token (e.g. cDAI), xSushi, AAVE Token (e.g. aDAI) is used as yield source of PoolTogether. https://docs.pooltogether.com/protocol/yield-sources

    • stETH is also a interest-bearing token (which is minted by depositing ETH as underlying asset). Therefore, stETH is suitable to be used as a yield source of PoolTogether.

    • This repo is a integration between Lido's stETH and PoolTogether yieid source interface.

 


怐Workflow怑

  • Diagram of workflow (Note: This repo is that only part of green one below is implemented) 怐Diagram怑Lido's stETH as a yield source of PoolTogether

 


怐Remarks怑

  • Version for following the Lido smart contract
    • Solidity (Solc): v0.6.12
    • Truffle: v5.1.60
    • web3.js: v1.2.9
    • openzeppelin-solidity: 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 (on local)

  • 1: Start ganache-cli
ganache-cli -d

(ā€» -d option is the option in order to be able to use same address on Ganache-CLI every time)
(ā€» Please stop and re-start if an error of "Returned error: project ID does not have access to archive state" is displayed)


  • 2: Execute test of the smart-contracts
npm run test:LidoYieldSource

( truffle test ./test/test-local/LidoYieldSource.test.js --network local )


怐Demo怑



怐References怑



About

This is a smart contract that can utilize Lido's stETH as a yield source of PoolTogetheršŸŽ«šŸŽŸ


Languages

Language:Solidity 70.0%Language:JavaScript 28.2%Language:Shell 1.7%