Enabling short-selling in DeFi using Aave credit delegation and One inch
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:
Mainnet fork was used, and project was built on scaffold-eth. However front-end could not be completed due to time constraints.
Using ganache-cli deterministic wallet creation was used to simulate the same conditions, and demonstrate MVP with Wrapped Eth
Margin contract was created based on Aave credit delegation framework
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.
Wait for sufficient time, and swap the tokens back into WETH i.e. payback credit.