Yield Protocol Bounty: Leveraged Borrowing using yvUSDC collateral
- Deploy;
- Approve USDC to the
YieldLever
contract; - Call
invest()
, sample calldata:
{
"baseAmount": "250000000000",
"borrowAmount": "750000000000",
"maxFyAmount": "757000000000",
"seriesId": "0x303230350000"
}
- For exit, call
unwind()
, sample calldata:
{
"vaultId": "0x2db8ebe62e77e730a70af447",
"maxAmount": "757000000000",
"pool": "0x80142add3a597b1ed1de392a56b2cef3d8302797",
"ink": "-991394806555",
"art": "0"
}
- For exit after maturity, call
unwind()
with maxAmount set to0
, sample calldata:
{
"vaultId": "0x2db8ebe62e77e730a70af447",
"maxAmount": "0",
"pool": "0x80142add3a597b1ed1de392a56b2cef3d8302797",
"ink": "-991394806555",
"art": "-755561186516"
}
- Start with 250k USDC and Borrow 750k USDC (flash loan from BZX);
- Deposit into the yvUSDC vault (earning ~5%);
- Use the yvUSDC to borrow 750K of USDC on Yield at 2.5%;
- Repay your 750k USDC loan.
- Borrow ~757k USDC (flash loan from BZX);
- Repay Yield loan and get yvUSDC back;
- Withdraw USDC from yvUSDC;
- Repay flash loan.
Contact me on Discord: JTP#3209