LevAave

Non custodial Onchain Leveraged positions powered by Aave and 1inch

Description

Long and Short Leveraged position powered byAave and 1inch exchange starting from this 1inch bounty idea: Leverage on AAVE using Flashloan and 1inch swap ($3,000 in 1INCH tokens): - Example of 3x ETH over USDC long position leverage. Convert user's $1k USDC into $3k ETH collateral and $2k USDC debt. Can be assembled in single transaction: 1. Get $2k USDC Flashloan 2. Convert it to ETH using 1inch API 3. Put $3k USDC as collateral to AAVE 4. Borrow $2k USDC from AAVE 5. Repay Flashloan with $2k USDC

LevAave showcase

How it's made

The project has been bootstrapped using scaffold-eth. The frontend is made with react and the interaction with ethereum blockchain with ethers library. The contract uses Aave v2 flashloans, pools and credit delegation. To make the swaps we use 1inch v2 exchange through their api.

Technologies used

EthereumSolidityUSDC1inchAaveAave Credit DelegationAave Borrow/Lending