Giter VIP home page Giter VIP logo

forcedao-yield-farming-strategy-on-polygon's Introduction

ForceDAO Yield Farming Strategy on Polygon

【Introduction of the ForceDAO Yield Farming Strategy on Polygon】

  • This is a smart contract that deal with a yield farming strategy which use AAVE and Polycat.finance on Polygon.
    • A user create a new Yield Farming Strategy contract via the Yield Farming Strategy Factory contract.
    • A user can earn double rewards from the AAVE Market and Polycat.finance . (In terms of the Polycat, this smart contract assume that use the single staking pool of the Polycat.finance in order to earn rewards. By the way, rewards token on Polycat.finance is the Fish Token : https://polycat.finance/pools )

 


【Workflow】

  • Diagram of workflow: diagram_ForceDAO

 


【Remarks】

  • Versions
    • 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

【Script for the DEMO of workflow】



  • 4: In advance, Please check MATIC token balance of executor's (user's) wallet address .


  • 6: Execute a script
npm run script:YieldFarmingStrategy

【Demo Video】


【Unit test (on local)】

  • 1: Start ganache-cli
$ ganache-cli -d --fork https://polygon-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)
(※ 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:YieldFarmingStrategy

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


npm run test:MasterChef

( truffle test ./test/test-local/polycat/MasterChef.test.js --network local )



【References】





forcedao-yield-farming-strategy-on-polygon's People

Contributors

masaun avatar

Stargazers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.