Aave Flash Loan
Last updated
Last updated
Rather than recursively leveraging by incrementally borrowing, staking, and depositing, the magic of SuperStaker simulates 15 levels of recursive leverage, and calculates the final amount of deposited stETH
and WETH
debt. This simulation happens in your browser, before any transactions are sent. Once the final loan amount is calculated, an Aave Flash Loan is trigger for the full amount.
What is a flash loan? A flash loan is a loan that is usually repaid within the same transaction, and thus no collateral is required. Some types of flash loans -- as used by SuperStaker -- are not repaid at the end of the transaction, but rather incur debt as long as sufficient collateral is supplied before the end of the same transaction.
Once the requested WETH
loan has been provided to SuperStaker, the WETH is unwrapped to native ETH
. This ETH
is then added to the ETH
you sent initially and the combined amount is staked via LIDO, returning 1 stETH
for each ETH
staked.
The final step is to deposit the stETH as collateral on Aave against the debt triggered by the flash loan.
The above steps are taken on your behalf, and you can then go the Aave Dashboard and see both the supplied stETH
and borrowed WETH
. The SuperStaker contract is designed to have Zero TVL.