Aave Flash Loans
Aave Credit Delegation
This project aims to short a token using the Aave credit delegation feature. V-Cred will be a series of projects which are deployed on Ethereum mainnet, and side chains like BSC, Avalanche etc. Problem: Currently there is no easy way to short a token... There are DeFi projects like Opyn which aim to provide an options alternative. Shorting a token does come with it risks, and the increased volatility will exponentially raise the margin requirements. A good solution would be to follow the margin account or line of credit pattern followed in stock markets to short token which will bridge the gap between CeFi/DeFi and provide a method to harness the volatility of tokens. Approach: 1. A margin contract will be used to store the tokens following the credit delegation framework. This contract will store the collateral 2. A short seller contract will be used to borrow token on behalf of margin contract. 3. Swap i.e. short sell the tokens for stable coin i.e. USDC in 1inch exchange 4. Wait for a specified duration when the token price goes down 5. Swap USDC back to original token to pay back the credit for margin contract.
How It's Made
Mainnet fork was used, and project was built on scaffold-eth. However front-end could not be completed due to time constraints. 1. Using ganache-cli deterministic wallet creation was used to simulate the same conditions, and demonstrate MVP with Wrapped Eth 2. Margin contract was created based on Aave credit delegation framework 3. Short seller contract was used to borrow tokens, and swap them on 1inch. To get the calldata the get request data was intrepreted in front-end and then invoked in the contract function. 4. Wait for sufficient time, and swap the tokens back into WETH i.e. payback credit.