Use Dai in the yDai Vault to supply and borrow Dai on Compound and sell COMP for yield and to pay the fees. Instead of a simple supply and borrow we can maximise yield by leveraging both positions up to the collateral factor.
The vault uses recursion (or flashloans or other means) to supply Compound with dai_vault * 1/(1-collatoral_factor) and borrows dai_vault * (1/(1-collatoral_factor)-1). The position should not be liquidatable because the collateral token and the borrowed token are the same and the ratio is fixed when setting up the position. A safety margin should be applied to the collateral factor, which would decrease yield slightly.
Example with current Compound rates:
100 Dai in Vault Collateral Factor for Dai is currently 75% 100 Dai * 1/0.25 -> 400 Dai supplied with 5.86% APY (2.82% supply rate + 3.04% COMP) 100 Dai * 1/0.25-1 -> 300 Dai borrowed with 0.10% APY (-3.90% borrow rate + 4.00% COMP) ----------------- 23.744% APY total 300 Dai borrowed is exactly 75% of the 400
With a safetly margin of 5% (using only a collateral ratio of 70%) we still get 19.7% APY.
Get better yield than currently. This Strategy can also be used for yUSDC vaults (or others e.g yUNI) and for usage in the yETH vault. Once implemented we can use it in v2 Vaults as an alternative strategy for many vaults (basically any profitable token on Compound). Currently there are 1200 million Dai supplied in Compound and about 960 million Dai borrowed out. Imo some 100 million more or less should not impact rates too much - especially since both supply and borrow amout in compound raise in similar proportion.
Supply 1/(1-scf) #token_in_vault to COMP and Borrow 1/(1-scf)-1 #token_in_vault from COMP to farm COMP with leverage.
collateral_factor (short cf) is defined by COMP per token_type.
safe_collateral_factor (short scf) is defined by Yearn to ensure no liquidation takes place.
scf = cf - safety_margin
For DAI & USDC:
cf = 0.75
scf = 0.7 (proposed - to be discussed)
cf = 0.6
scf = 0.55 (proposed - to be discussed)
There are multiple options to go into leveraged positions in COMP:
Recursion is illustrated in the diagram:
Flashloan utilizes Aaves flashloans for providing the target supply according to the formula without iterating. The borrowed assets are used to pay back the flashloan.
Pseudo-Flashloans could use other funds as collateral (e.g. YFI) to borrow the funds from a lending platform (probably Aave) to reach target supply without paying the fees for a regular flashloan. The debt could be payed back subsequently (even in the same transaction) with the borrowed asset.
- Better yield than current vault
- Usable for other Vaults
- great addition to v2 Vaults as an additional strategy
- With large volume it might impact Compounds rates
- Need to track collateral ratio if Compound community decides to change ratio
- Cool let’s do it
- Nah this sucks