MIP13c3-SP2: Declaration of Intent - Dai Flash Mint Module

MIP13c3-SP2: Declaration of Intent - Dai Flash Mint Module


MIP13c3-SP#: 2
Author(s): Sam MacPherson (@hexonaut)
Contributors: n/a
Status: Accepted
Date Proposed: 2020-08-11
Date Ratified: <yyyy-mm-dd>
Declaration Statement: Add support for flash-minting Dai.
Declaration to Replace: n/a


Context and Motivation

Flash mints allow anyone to mint as much Dai as they need with the one condition that they pay it all back in the same transaction with a fee. This allows anyone to exploit arbitrage opportunities in the DeFi space without having to commit upfront capital.

A flash mint module will provide the following benefits:

  • Improves market efficiencies for Dai.
  • Democratization of arbitrage - anyone can participate.
  • Exploits requiring a large amount of capital will be found quicker which makes the DeFi space safer overall.
  • Fees provide an income source for the protocol.

Declaration Detail

MakerDAO Governance requests a Dai Flash Mint module be built and integrated with the Maker system. This module should include both an optional fee parameter as well as an optional debt ceiling which MakerDAO Governance can adjust after deployment via executive vote.

This implementation is flexible beyond the core criteria of adding a Flash Mint Module with an optional fee and debt ceiling.

Relevant Links


I think I’d like to see as many parameters as possible exposed to governance. Fee is definitely good, but I feel like the maximum borrow should also be tweakable by governance.

There is a chance that we’d want to limit it in the short-medium term, or even in response to the use of the module to attack another DeFi project. In general it just seems like something that would be good to be able to adjust if necessary (it would also allow governance to turn it off if it caused unforeseen issues.)


Added language for a debt ceiling. Good idea @LongForWisdom.


First, let me say, I am more in favor of this than not. I like the limiting parameters, and all the points you’ve made are dead on aside from the one I quoted.

When the protocol liquidates a position it’s to reclaim the Dai debt and fees. All of this is the protocol asking for Dai in return for the collateral from the position. Since a flash lending module would expect Dai to be returned at the end of the transaction, and the new liquidation system expects Dai to be returned too, the only path that makes sense is to flash lend the Dai, so that one can give it to the liquidation system, so that one can use the collateral to source Dai on the market to return to the flash lending module. This circuit has more steps than we’ve already envisioned for LIQ-2.0. We are planning on simply flash lending the collateral with an expectation of Dai returned at the end of the transaction. This is a simpler circuit requiring much less gas.

This doesn’t take away from any of the other points you’ve made, and technically what you’ve written is correct; we are just envisioning a more efficient mechanism in LIQ-2.0 that would make this one feature of a Dai flash lending module superfluous for liquidations.


I heard @wouter mention this in the chat the other day, but wasn’t aware it was being included now. Thanks for the clarification. I’ll remove this as a benefit.

LIQ-2.0 is still under active development, so I can’t commit and say this feature will definitely be in the final release, but we think this would be the most gas efficient way to take advantage of existing DeFi liquidity for liquidations.


which platform is originating the most flash loans these days i sincerely don’t know

has anyone done a cost benefit analysis to determine if this would generate any revenue for MCD when you can just do feeless flash loans on dydx

MCD flash loans would offer more liquidity


I think Aave does a fair amount of volume. Details here: https://aavewatch.now.sh/flash-loans

I know they charge a 0.09% fee as well, with 30% going to the protocol and 70% going to depositors.

1 Like

I would be extra careful with adding flash minting to DAI. It’s not uncommon for contracts to check only for underflow, and skip overflow checks to save gas. In these situations, flash minting would create new exploits.

Overall I can see many ways where flash minting in DAI would lead to new hacks.

If the community decides the move forward with this proposal, I think it requires to:

  • Evaluate all the contracts that rely on DAI to see what would be the impact of flash minting
  • Evaluate what should be the limit of tokens to be minted within the same block

This is a great point. It may make more sense to set an arbitrarily high debt ceiling that is well below the integer limit instead of no limit. In any case the debt ceiling parameter will cover this.


This is quite thought provoking. Since MakerDAO is the primary credit generation facility of DeFi, it has the privilege to mint Dai, which is already deeply integrated as collateral types and shares of Liquidity Pools, as opposed to the recently introduced Flash-Mintable-Tokens (FMTs).

A Dai Flash Mint Module would stress-test all DeFi protocols, not just those touching Dai.
Since Dai can be used as collateral on secondary lending protocols (i.e. Compound, Aave, etc), one could practically borrow all forms of collateral with an arbitrarily large amount of Flash Minted Dai (e.g. 10T). Therefore, even projects without Dai support wouldn’t be gated from the influence of a Flash Mint.

Moreover, this acts as a second-order flash loan (in the borrowed asset), leading to improved market efficiencies beyond Dai.

I agree with @LongForWisdom that we should enforce limits in the short-medium term, as it will allow projects to react with protocol improvements and defend against attacks needing limitless capital.

But regardless of the guardrails, I agree with this MIP and think it’ll carry many long-term benefits to DeFi (and Maker) that are simply not found in Traditional Finance.

As @montyly advised, if this comes to fruition, I’ll help to carry out two deliverables:

  1. Notify and help mitigate any impact to other large DeFi protocols (think Compound, dydx, etc)
  2. Write a concise and coherent integration guide, improving the developer experience

Setting mint limits reduces my fear of big surprises biting us quickly after the release. I’m very much for having a flash mint module.

1 Like

Bump for visibility.

Next Tuesday Sept 1st starts the frozen period for this proposal. Is anyone looking to add any changes before then?

I guess the only question I have (and I know it has not been determined) is how much Revenue is this instrument going to provide for Maker? I think DYDX has 0% fee and Aave is 0.09%. Wondering what if any revenue this instrument can bring to Maker. Another questions–as far as innovation–will it be user friendly? Trying to figure out what the competitive advantage would be versus others…


So the nice thing is that assuming Dai becomes the main currency of DeFi, we can undercut all the competition in terms of fees. All the other services require lenders on the other side locking up their collateral whereas we have no such constraint. There is a price point at which the cost of capital allows us to dominate the flash loan/mint arbitrage market. It’s not clear yet what this price point is, but we can play around with it.

With regards to being user friendly, there doesn’t really need to be a GUI because flash mints require custom code anyways.


So this is now in the formal submission phase. Thanks to everyone for the feedback.

I’ve built out the module myself to save time: https://github.com/hexonaut/dss-flash


Updated to Accepted as per MIP.

1 Like