(WIP) Automated delta neutral yield farming vaults.
Based off of the Autolido stragety I outlined.
Note: This project is in it's early stages and testing may be incomplete or not work. I don't recommend going through the headache (yet)
- Make sure you have node.js installed
- Create a .env file and define CMC_KEY, PRIVATE_KEY, BOB, ALICE, MOONRIVER_RPC, MOONSCAN_KEY, and ETHEREUM_RPC (yes, this will be simplified later)
- Run
yarn
to install dependencies - Run
yarn hardhat compile
- Run
yarn hardhat test
- sandwich attack protection
- gelato integration (WIP)
- rebalancing
- compounding
- pausing
- unbond withdrawls
- pausing
- access protection on rebalance() so people don't spam it and incure bad debt
- batch withdrawls so vaults don't get limited by the 20 unbond requests at a time limit on Lido
- create interfaces and remove redundant files for lido
- make sure people can withdraw even with an oracle error
- compound lending market rewards
- make afterBorrow and beforeRepay return something?
-- urgent:
- check rounding math, look into rounding down
- fix bug in withdraw
- bad debt is caused when debt > stakedValueInAsset (i.e cost to borrow > staking rewards for too long)
- can be fixed by sending the staked token directly to the vault