Migrate your lending & borrowing positions on Aave to another wallet
1) Bad user experience when doing asset migration manually from 1 wallet address to another
Numerous Steps required to execute manual transfer:
i) Debt from sender wallet needs to be payed back in order for deposited collateral to be retrieved
ii) Deposited collateral needs to be retrieved
iii) Sometimes users will borrow from recipient wallet first to pay back Step (1). Users risk liquidation if price moves drastically against them during the manual transfer process.
2) A more serious problem when mitigating a hack (Time sensitive)
Assuming a user's wallet gets hacked, the user will be competing against the hacker and only has a very brief period of time to migrate their funds to their new wallet. Speed of asset transfer is critical to saving victim's funds.
This tool is meant to make the transfer of lending and borrowed assets much smoother,simpler and faster from their current wallet to another wallet that they own. With a click of a button, users can migrate their entire positions on Aave (including debts) without having the funds to repay their debt at that moment.
The smart contract uses Aave flashloan to help out transfer their positions by injecting external liquidity.
Deployed on Goerli
- Aave V3: https://goerli.etherscan.io/address/0x5b5c27bda785970d5207fb5a9ed0dcdd19bd018e
- Aave V2: https://goerli.etherscan.io/address/0xb139b3508d637cce06a160666348ebaf24b77fd7#code
Frontend Repo: https://github.com/SBIP-Migration/client
Website Demo: https://client-five-psi.vercel.app/
Video Demo of OmniTransfer App: https://drive.google.com/file/d/1WIFqMQwiWuUlb_ROBJCHrQ1tS90UnOnC/view?usp=share_link
It is a 5 step process:
- Take flashloan from Aave Lending Pool
- Use flashloan funds to repay all existing debts in original wallet
- Transfer lending positions (aTokens) from the original wallet to destination wallet
- Reborrow previous debt positions in destination wallet
- Repay flashloan with an additional flashloan fee
The cost incurred for the users to migrate their positions are as follows:
approve
each of the lending positions to the contractapproveDelegation
each of the previous debts in the "original" wallet, to allow the contract to borrow on behalf of the "destination" wallet- Transaction cost for the smart contract call to migrate their positions
- Flash loan fee that is determined by Aave DAO when we borrowed the flash loan
- We could propose this tool for AAVE to enhance user experience. Allow this function for users to send to their whitelisted addresses only ( Mitigate hacks and increase user satisfaction)
- To offer these services to other lending and borrowing protocols like Compound