(A flash loan protocol based on Aave and Compound)
The ThunderLoan protocol is meant to do the following:
- Give users a way to create flash loans.
- Give liquidity providers a way to earn money off their capital.
Liquidity providers can deposit
assets into ThunderLoan
and be given AssetTokens
in return. These AssetTokens
gain interest over time depending on how often people take out flash loans!
A flash loan is a loan that exists for exactly 1 transaction. A user can borrow any amount of assets from the protocol as long as they pay it back in the same transaction. If they don't pay it back, the transaction reverts and the loan is cancelled.
Users additionally have to pay a small fee to the protocol depending on how much money they borrow. To calculate the fee, we're using the famous on-chain TSwap price oracle.
We are planning to upgrade from the current ThunderLoan
contract to the ThunderLoanUpgraded
contract. Please include this upgrade in scope of a security review.
Suppose there is a DEX A
and DEX B
, User Bought 1000 ETH
for $5000
and selled the 1000 ETH
to DEX B
at $6000
, coz the price of ETH was increased at the time of DEX B
. Thus, gained a profit of $1000
. This is known as arbitrage.
Some of my personal notes here