Giter Site home page Giter Site logo

strategy-synlev's Introduction

Yearn Strategy Mix

What you'll find here

Solidity Smart Contract template for creating your own contract in the Brownie framework.

Interfaces for some of the most used DeFi protocols on ethereum mainnet.

Sample test suite that runs on mainnet fork.

How does it work for the User

Let's say Alice holds 100 DAI and wants to start earning yield % on them.

For this Alice needs to DAI.approve(vault.address, 100).

Then Alice will call vault.deposit(100).

Vault will then transfer 100 DAI from Alice to itself, and mint Alice the corresponding shares.

Alice can then redeem those shares using yVault.withdrawAll() for the corresponding DAI balance.

How does it work for the Vault

TODO

Requirements

  • Install Brownie

  • Install Dev dependencies: pip3 install -r requirements-dev.txt

    • Use whatever pip version available
  • Install ganache-cli: npm install -g [email protected]

    • For those of you using Node 14, you'll need to launch ganache-cli via node 8, 10, or 12 until this is fixed. For example, run nvm use 12 && npm install ganache-cli -g to install for node 12, and then run ganache-cli with nvm use 12 && ganache-cli.

  • Install npm dependencies: npm install

  • Install project dependencies:

$ brownie pm install iearn-finance/[email protected]
$ brownie pm install OpenZeppelin/[email protected]
  • Copy .env.example to .env

  • Setup ETHERSCAN_TOKEN & WEB3_INFURA_PROJECT_ID on .env

Useful commands

  • Compile contracts with: brownie compile (or brownie compile --size to see EVM bytecode sizes)

  • Run tests with: brownie test

strategy-synlev's People

Contributors

andy8052 avatar

Watchers

 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.