Skip to content

Yield Protocol Bounty: Leveraged Borrowing using yvUSDC collateral

Notifications You must be signed in to change notification settings

jack-the-pug/yvUSDCYieldLever

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 

Repository files navigation

yvUSDC YieldLever

Yield Protocol Bounty: Leveraged Borrowing using yvUSDC collateral

How to use it?

  1. Deploy;
  2. Approve USDC to the YieldLever contract;
  3. Call invest(), sample calldata:
{
  "baseAmount": "250000000000",
  "borrowAmount": "750000000000",
  "maxFyAmount": "757000000000",
  "seriesId": "0x303230350000"
}
  1. For exit, call unwind(), sample calldata:
{
  "vaultId": "0x2db8ebe62e77e730a70af447",
  "maxAmount": "757000000000",
  "pool": "0x80142add3a597b1ed1de392a56b2cef3d8302797",
  "ink": "-991394806555",
  "art": "0"
}
  1. For exit after maturity, call unwind() with maxAmount set to 0, sample calldata:
{
  "vaultId": "0x2db8ebe62e77e730a70af447",
  "maxAmount": "0",
  "pool": "0x80142add3a597b1ed1de392a56b2cef3d8302797",
  "ink": "-991394806555",
  "art": "-755561186516"
}

How it works?

For invest:

  1. Start with 250k USDC and Borrow 750k USDC (flash loan from BZX);
  2. Deposit into the yvUSDC vault (earning ~5%);
  3. Use the yvUSDC to borrow 750K of USDC on Yield at 2.5%;
  4. Repay your 750k USDC loan.

For unwind:

  1. Borrow ~757k USDC (flash loan from BZX);
  2. Repay Yield loan and get yvUSDC back;
  3. Withdraw USDC from yvUSDC;
  4. Repay flash loan.

☎️

Contact me on Discord: JTP#3209

About

Yield Protocol Bounty: Leveraged Borrowing using yvUSDC collateral

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published