Code Monkey home page Code Monkey logo

yearn-recycle's Introduction

Yearn Recycle

A contract that recycles all your [DAI, USDC, USDT, TUSD] into yCRV and further into yUSD vault.

Usage

You need to grant allowances on four tokens to this contract before using it. This only needs to be done once.

Using Brownie

$ brownie accounts import user keystore.json

$ brownie console --network mainnet

user = accounts.load('user')

recycle = Recycle.at('0x78e307F6e8584DaA0D85aDD918c0e3e4dD469A9C')

dai = interface.ERC20('0x6B175474E89094C44Da98b954EedeAC495271d0F')
usdc = interface.ERC20('0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48')
usdt = interface.USDT('0xdAC17F958D2ee523a2206206994597C13D831ec7')
tusd = interface.ERC20('0x0000000000085d4780B73119b644AE5ecd22b376')

for coin in [dai, usdc, usdt, tusd]:
    coin.approve(recycle, 2**256 - 1, {'from': user})

recycle.recycle({'from': user})

Using Etherscan

  1. Call approve(0x78e307F6e8584DaA0D85aDD918c0e3e4dD469A9C, 115792089237316195423570985008687907853269984665640564039457584007913129639935) for DAI, USDC, USDT, TUSD.
  2. Call recycle() here.

Deployments

Ethereum Mainnet: 0x78e307F6e8584DaA0D85aDD918c0e3e4dD469A9C

Audits

TBD.

yearn-recycle's People

Contributors

banteg avatar iamdefinitelyahuman avatar 0xalizk avatar

Watchers

James Cloos 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.