Become more familiar with DeFi and flashloans in CodeHawks' most challenging First Flight yet! Thunder Loan allows users to create flash loans and provides yield to it's liquidity providers!
High - 100xp
Medium - 20xp
Low - 2xp
Starts: Noon UTC Wednesday, Nov 01 2023
Ends: Noon UTC Wednesday, Nov 08 2023
The ⚡️ThunderLoan⚡️ protocol is meant to do the following:
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!
What is a flash loan?
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.
We are planning to upgrade from the current ThunderLoan
contract to the ThunderLoanUpgraded
contract. Please include this upgrade in scope of a security review.
git --version
and you see a response like git version x.x.x
forge --version
and you see a response like forge 0.2.0 (816e00b 2023-03-16T00:05:26.396218Z)
git clone https://github.com/Cyfrin/2023-11-Thunder-Loan
cd 2023-11-Thunder-Loan
make
If you can't or don't want to run and install locally, you can work with this repo in Gitpod. If you do this, you can skip the clone this repo
part.
forge test
forge coverage
and for coverage based testing:
forge coverage --report debug
├── interfaces
│ ├── IFlashLoanReceiver.sol
│ ├── IPoolFactory.sol
│ ├── ITSwapPool.sol
│ #── IThunderLoan.sol
├── protocol
│ ├── AssetToken.sol
│ ├── OracleUpgradeable.sol
│ #── ThunderLoan.sol
#── upgradedProtocol
#── ThunderLoanUpgraded.sol
None