Written by Pablo Gómez
Founder & CEO at Metlabs · Reviewed on October 11, 2026
ERC-3156 defines two complementary interfaces so any contract speaks one common flash-loan language. The lender exposes `maxFlashLoan` (maximum lendable), `flashFee` (the fee) and `flashLoan`, which delivers the funds. The borrower implements the `onFlashLoan` callback, where it runs its logic and approves repayment of principal plus fee before the transaction ends. As an anti-attack confirmation, the borrower must return the keccak256 hash of the string "ERC3156FlashBorrower.onFlashLoan". The fee can be zero, which enables flash minting.
It standardizes a primitive that each protocol used to implement its own way. With a shared interface, one borrower contract can operate against any conforming lender without rewriting code, delivering real interoperability between DeFi components. Typical use cases are cross-market arbitrage, liquidations, position refinancing and swapping collateral or debt in a single step.
The reference implementation is the repository by Alberto Cuesta Cañada, one of its authors. MakerDAO adopted ERC-3156 in its DAI flash-mint module, and OpenZeppelin ships the `ERC20FlashMint` extension based on this interface. One common misunderstanding is worth clearing up: protocols such as Aave use their own flash-loan interfaces that inspired the standard but do not share its signature, so they are not literal ERC-3156 implementations.
Sources
Also known as
- ERC3156
- Flash Loans





