Collection of Flash Loan Examples
Last updated Jun 6, 2026
22
Stars
6
Forks
0
Issues
0
Stars/day
Attention Score
12
Language breakdown
Solidity 63.2%
TypeScript 36.8%
▸ Files
click to expand
README
⚡️ Flash Loan Examples
A collection of implementation examples of EIP-3156, Aave, MakerDAO, Uniswap, and etc...
Basic

How to run
- Node.js (16.x)
- Yarn (3.x)
$ yarn install
$ yarn test
EIP-3156: Flash Loans
$ yarn test test/basic
References
- https://eips.ethereum.org/EIPS/eip-3156
- https://soliditydeveloper.com/eip-3156
- https://docs.openzeppelin.com/contracts/4.x/api/interfaces#IERC3156FlashLender
- https://docs.openzeppelin.com/contracts/4.x/api/interfaces#IERC3156FlashBorrower
- https://docs.openzeppelin.com/contracts/4.x/api/token/erc20#ERC20FlashMint
- https://github.com/alcueca/ERC3156
Aave
...
References
- https://docs.aave.com/developers/guides/flash-loans
- Aave - Flash Loan
- https://www.alchemy.com/overviews/creating-a-flash-loan-using-aave
MakerDAO
...
References
- https://docs.makerdao.com/smart-contract-modules/flash-mint-module
- https://github.com/makerdao/dss-flash
Uniswap
References
- https://docs.uniswap.org/protocol/guides/swaps/single-swaps
- https://uniswap.org/blog/your-first-uniswap-integration
- Uniswap V3 - Single Hop Swap
- Uniswap - Flash Swaps
- Uniswap: Flash Swaps on Uniswap v3
Contributors
We love pull requests from everyone. By participating in submitting examples, we believe other people will find them useful when they getting started with the topic.
License
The software is available as open source under the terms of the MIT License.
🔗 More in this category