Skip to content

fadingflea/dai_alchemix_strategy

Repository files navigation

Dai Alchemix + Yearn Strategy

Strategy to deposit DAI in Alchemix, borrow alUSD & deposit in Curve Pool and then deposit LP tokens in Yearn's Curve alUSD vault.

What the contract does:

  1. Deposits DAI in Alchemix V2
  2. Mints alUSD from Alchemix V2
  3. Deposits alUSD in the Curve Factory USD Metapool alUSD3CRV.
  4. Deposits Curve LP Token to Yearn's Curve alUSD vault in the name of the sender.

How to test it in your local blockchain

As Alchemix V2 only allows the interaction of whitelisted contracts (apart from all EOAs, we must first whitelist our contract in the Whitelist in our local blockchain.

  1. Install hardhat & dependencies
  2. Run local blockchain using mainnet forking
  3. Run scripts/deploy in localhost
  4. Create .env file and fill out their variables as in .env.example
  5. Run scripts/contractSetup in localhost
  6. Earn :)

This is unadited code and for experimental purposes. Use it at your own risk.

About

Strategy to deposit DAI in Alchemix, borrow alUSD & deposit in Curve Pool and then deposit LP tokens in Yearn's Curve alUSD vault

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published