Skip to content

Use Alchemix V2 to get a self repaying loan and then swap alETH for DAI

Notifications You must be signed in to change notification settings

andrebrener/alchemix_extender

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 

Repository files navigation

Alchemix Extender

Contracts & Front end for the app

What the app does:

  1. Deposits DAI in Alchemix V2
  2. Mints alUSD from Alchemix V2
  3. Swaps alUSD for DAI in Curve
  4. Transfers DAI to a selected beneficiary.

How to use it

Alchemix V2 only allows whitelisted contracts (regular EOAs are obviously allowed) to interact with their contract. So, for now we must use this app with a local mainnet fork and whitelist ourselves in the Alchemix Whitelist contract.

  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 .env.example
  5. Run scripts/setup-for-front in localhost to set the whitelist and other setup.
  6. Run the frontend with npm run dev
  7. Use the app & Enjoy :)

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

About

Use Alchemix V2 to get a self repaying loan and then swap alETH for DAI

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published