-
Notifications
You must be signed in to change notification settings - Fork 11.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add EIP3156 FlashLoan support (ERC20 extension) #2540
Comments
This sounds nice. Have the EIP or an implemenation been audited? Are there production deployments? |
I'm not 100% sure, @albertocuestacanada might be able to tell use more. Maybe yield uses it. |
there is this ERC3156 compatible uniswap wrapper: https://ftmscan.com/address/0xa89a83890cc5d43d710846cefcb4a41007a37347#code |
Hi there! As all EIPs that make it to Final, ERC3156 has been thoroughly audited pro-bono by an all-star team, including your own Austin Williams. There are two ERC3156 compliant wrappers in mainnet and fantom, MakerDAO's MIP-25 is compliant, audited, and scheduled to go live soon, and Cover Protocol is also a compliant borrower. WETH10 is scheduled to go live soon and is also a compliant lender. Yield doesn't use it in v1, but v2 will implement it for sure. |
Please note that the reference implementation is here: https://github.com/albertocuestacanada/ERC3156 Not to be confused with the ERC3156-Wrappers, which are a personal project: |
Implementation proposal: https://github.com/Amxx/openzeppelin-contracts/blob/feature/ERC3156/contracts/token/ERC20/extensions/draft-ERC3156.sol I just wonder why the return value for |
The return value is a sentinel to make sure the lender didn't accidentally call the fallback function. Maybe you should give a hand to @MicahZoltu in reviewing ERCs. That's quite a detail to know about. |
Its true that returning a bytes4 is "weaker". This is the de-facto standard for many eip however (721, 777, 1155, 1271, ...) |
I don't see why the seed for a particular sentinel needs to be standardized? It is just "a well known value" and its actual contents don't matter at all. |
any updates on this? |
PR #2543 is basically good to go. Should be in 4.1 release. |
🧐 Motivation
ERC3156 is now final
📝 Details
Provide an extension for ERC20 that implements this ERC.
The text was updated successfully, but these errors were encountered: