“Anyone can be rich for an instant.” or “Perfect credit from atomicity.”
Flash-mintable tokens (FMTs) are ERC20-compliant tokens that allow flash minting: the ability for anyone to mint an arbitrary number of new tokens into their account, as long as they also burn the same number of tokens from their account before the end of the same transaction.
You can think of FMTs as “credit tokens”. Flash-minting FMTs is like “running up a tab”, and burning the tokens at the end of the transaction is “paying off your tab”. If you don’t pay off your tab by the end of the transaction, then the transaction is reverted, and it is as if you never ran up a tab to begin with.
Flash-minting is a powerful idea, but only if the tokens themselves have some value.
Asset-backed tokens are ERC20-compliant tokens that are 1-to-1 backed and trustlessly redeemable for some other asset. The canonical example is Wrapped Ether (WETH).
Anyone can send an asset (ETH in this case) to the contract and receive one WETH token in return. The WETH token can be transferred and sold to anyone, just like any other ERC20 token.
More importantly, anyone who holds a WETH token can instantly and trustlessly redeem it for one ETH by sending it back to the contract. This is what makes WETH an asset-backed token.
The most important thing to know about asset-backed tokens is that they have exactly the same market value as their underlying asset. One WETH will always be worth exactly one ETH, and vice versa.
A flash-mintable asset-backed token is exactly what it sounds like: an ERC20-compliant token that is:
To see that flash-mintable asset-backed tokens maintain their market value even during a flashMint — when they are not all backed by assets — consider the following thought experiment for a flash-mintable asset-backed token called FlashWETH (using ETH as the underlying asset).
Suppose you receive a FlashWETH token during a flashMint and consider the following cases:
Case 1: You try to redeem the FlashWETH during the flashMint
If you try to redeem the FlashWETH for ETH by calling withdraw during the execution of flashMint one of two things will happen:
Case 2: You do not try to redeem the FlashWETH during the flashMint
If you do not try to redeem the FlashWETH for ETH during the same flashMint transaction, then either:
It is impossible for a transaction to end with any FlashWETH tokens being unbacked by ETH.
This means that the only time the FlashWETH tokens are ever unbacked is during the execution of a flashMint.
In short, everyone can always accept FlashWETH at full face value because either it is instantly redeemable for ETH whenever they want, or else the EVM will revert and they’ll have never accepted it in the first place.
Imagine if all of your users were whales.
Integrating flash-mintable asset-backed tokens into your project lets all of your users act like whales. They can have access to as much money as they need to do whatever they want on your platform. If your project makes fees on volume, this is a no-brainer.
Instead of sending them off to some flash-lending pool somewhere, you can serve them directly. Save them gas and fees. Give them access to a virtually unbounded amount of money. Completely remove their dependence on third-party flash-lending platforms.
Other platforms are using the “trustlessness of atomicity” to extend credit to your users via flash-loans, often charging them for the privilege. You can cut out those middlemen and give your users credit directly. And you can do it with no additional code. All you have to do is accept flash-mintable asset-backed tokens the same way you already accept asset-backed tokens such as WETH.
Note that flash-mintable asset-backed tokens don’t require liquidity pools like flash-loans do. Anything users can do on your platform using a $100M flash-loan from a third-party, they can also do using flash-mintable asset-backed tokens once you’ve integrated — even if the flash-mintable asset-backed token contract isn’t holding very much ETH.
Flash-mintable asset-backed tokens are powerful.
This was a research project by Austin Williams of the OpenZeppelin Research team.
There is a 1-hour video presentation on this project along with slides.
The example FlashWETH contract is on mainnet with the code in GitHub.
Warning: The contracts are simple but have not been audited. Be careful.