Skip to content

Update ERC-3156: Make ERC-3156 Flash Mint Reference Implementation compliant with its own spec#1591

Open
red-swan wants to merge 2 commits intoethereum:masterfrom
red-swan:master
Open

Update ERC-3156: Make ERC-3156 Flash Mint Reference Implementation compliant with its own spec#1591
red-swan wants to merge 2 commits intoethereum:masterfrom
red-swan:master

Conversation

@red-swan
Copy link

@red-swan red-swan commented Mar 10, 2026

Add check in maxFlashLoan for unsupported tokens

According to ERC-3156:

The maxFlashLoan function MUST return the maximum loan possible for token. If a token is not currently supported maxFlashLoan MUST return 0, instead of reverting.

However in the Flash Mint Reference Implementation, the maxFlashLoan function returns it's own token's maximum loan amount regardless of the token parameter that is provided when called. This PR simply adds a check like in flashFee to see in the user's token parameter is this and to return correctly based on that check.

Add check to return zero in `maxFlashLoan` for unsupported tokens

The maxFlashLoan function MUST return the maximum loan possible for token. If a token is not currently supported maxFlashLoan MUST return 0, instead of reverting.
@eip-review-bot
Copy link
Collaborator

eip-review-bot commented Mar 10, 2026

File ERCS/erc-3156.md

Requires 1 more reviewers from @alcueca, @fifikobayashi, @fubuloubu, @onewayfunction
Requires 2 more reviewers from @g11tech, @jochem-brouwer, @lightclient, @samwilsn, @xinbenlv

@eip-review-bot eip-review-bot changed the title Make ERC-3156 Flash Mint Reference Implementation compliant with its own spec Update ERC-3156: Make ERC-3156 Flash Mint Reference Implementation compliant with its own spec Mar 10, 2026
@github-actions
Copy link

The commit 7b5ba6b (as a parent of 7c08abb) contains errors.
Please inspect the Run Summary for details.

@github-actions github-actions bot added the w-ci label Mar 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants