MIP29 - Peg Stability Module

This is not how I read this MIP. Goal is 1:1 trading, adjusted by fees.
If the fees are indeed 1% this means MIP29 can not help the peg inside the 0.99-1.01 range.
Am I correct?

Edit: outside corrected to inside

1 Like

If the fees both ways are set to 1% it will enforce a hard limit of 0.99-1.01 provided there is debt ceiling room or usdc available because it’s free money otherwise. There are a number of other benefits outlined in the pre-mip though.

1 Like

Does this contract have a enable/disable switch? We definitely want to disable it when the DAI savings rate (DSR) is greater than zero, yes? Maybe it should have a switch for each direction so we can set it to drain DAI liquidity in preparation to increase the DSR above zero.

Hm, can the switch be locked to the condition DSR!=0?

1 Like

It’s a parameter, I used tin at 1% and tout at 0%. I find this solution strictly superior to USDC-A so I don’t want to give the impression that we need to narrow the peg band more that what is currently done.

It can, but it’s not mandatory.


It has all the same controls as a regular vault type. We can turn off minting dai by setting the dc to 0. We cannot turn it off the other way though and we should let it drain first before turning on the dsr (same with usdc-a, etc).


Looks good

That is important :

1 Like

MIP14 allows you to do this, but you need to know specifically where you are sending the DAI. In terms of actually engaging auditors, you’d probably want to approach them and secure an agreement for work provided that DAI is paid upfront.

In terms of using it for bounties, this is currently possible, again, you just need a recipient address.

I’d largely agree with some of the others and say that the first step should be replicating the current stable-coin vault types in terms of fees. The ceiling should probably start low to limit risk.


Thanks LFW. Yesterday in MakerDAO’s chat, @hexonaut said:

So let’s wait a few days to see how this thing evolves. Ideally, the Smart contract team can give us indications on the necessity or not of 3rd party audits and stuff like that.


Awesome work - so glad to see progress on this

Some basic questions.

Is tin and tout in this design expected to be managed by governance or just set and left alone? I can’t imagine these are fixed values because then this part of the code would have to be redeployed on changes to tin/tout?!

Are tin and tout always expected to be above 0 and hence PEG always bracket 1-tout <= PEG <= 1+tin?

What is a scenario where this module actually causes the PEG to regulate around 1? (i.e. what are the tin and tout settings in this scenario and why is the PEG at 1 vs 1+tin and how much stablecoin liquidity is there in the PSM at this time).

Correct me if I am wrong in the understanding here.

with tin = 1% and tout=0. Lets say a user comes to the PSM and wants to swap 1010USDC for 1000 DAI. My understanding of the above code is the contract basically creates a vault and deposits 1010 USDC and mints 1010DAI. 1000 goes back to the USDC depositor and 10DAI goes into the surplus?

What happens in the above code if say for some reason USDC is trading at .985 US while DAI is trading at $1+tin for sake of illustration.

  • In the above example: What is to stop the system from minting 1000 DAI worth (1000+tin*1000)USD for 1000 USDC that is worth only $985US?
  • If there is something that stops the above, how does the price in USD of the stablecoin being converted relate to how much DAI the user gets and is this displayed in the User Interface to the PSM?

I think I disagree with the bolded part of the quote below:

I don’t see how a fixed tin and tout value causes any work other than to act as a pricing bracket at 1-tin as long as there is stablecoin liquidity in the PSM, and 1+tout as long as there is available DAI DC. As @LongForWisdom repeatedly points out without liquidity on either end here the facility ceases to regulate.

What is the backup PEG regulation if the PSM runs out of liquidity?

On the PEG downside everyone feels like stablecoin liquidity will exhaust rather rapidly and Maker has SF and DSR to cause the PEG to rise back to 1. But do we really give up our stablecoin PEG liquidity buffer at 1 PEG price or do we perhaps lower the 1-tout down to .99 and use the stablecoin liquidity in that case to act as a price stabilizer on the low side?

On the PEG highside is there going to be another facility that is available in case the PSM DC exhausts before governance can extend it?

Also on first glance there is no rate control on this. Literally someone could come and eat all of the available liqudiity in one shot (think flash loan here that costs tin% for the entire available DC), killing the PSMs ability to manage the PEG for some time (GSM delay to extend DC?!). Is the DC alone the best way to control capital flows into and out of this facility or should the rate of flow be controlled to some extent.

Looking at this proposal it really just looks like another variation of a USDC vault except fees are taken out up front. I have concerns over how the USD price of stablecoins minting DAI will be managed against the USD PEG price of DAI and what happens here if the collateral value in USD happens to drop below $1 as this will negative affect 1:1 collateral:DAI backing collateral value.

Notice during an ES these USD price oracles on collateral and DAI would be taken into account in normal vault claiming left over collateral… With the PSM the oracle price, if it is considered at all, is only at the time the exchange is made(we don’t care what the price of USDC does because we simply are not going to liquidate positions).
I think this adds an extra hazard for DAI holders in terms of collateral backing. Even at LR of 101 on USDC vaults with SF = 0 if USDC were to drop to what .99 with PEG at 1.01 or higher (for some reason) pretty much puts DAI holders in an ES short some collateral value.

The whole backing value was one of the main reasons I really wasn’t hot to go to LR of 101 on USDC-A with liquidations off mostly because one is limiting the collateral value buffer to only a 1% USD price change on the collateral (.99). If I my understanding is correct the PSM here is no longer has such a collateral USD value buffer as DAI is minted for stablecoins at 1:1 with profit immediately going into the surplus.

1 Like

These can be changed after deployment by governance.

It’s up to governance how they want to set these. It’s possible to leave one or both of them at 0% depending on the size of the debt ceiling. I’m guessing we probably won’t want to set the fees both to 0% as your bracket equation is correct as long as there is debt ceiling or liquidity available to go either way.

This is correct.

This is essentially the case where Dai is trading above $1.01 USDC (not USD). In this case free money is available, and the price will be arbitraged until it reaches $1.01 again (or the debt ceiling is reached).

Yes this would be more against short term price shocks in the other way. Definitely if we sustain a price of < $1 the PSM will clear out quickly and we need to move onto Stability Fee price regulation after that same as before. That being said, this is the case where the tout is set to ~0%. We could increase that if we want to maintain a pool of USDC for extreme price shocks in the other direction. These are all options available that need to be discussed. It’s not really my place to comment on what the fees will be. I’m just putting the code out there.


Note: I’ve updated the design to put the PSM on the other side of the join adapter. Will update the MIP to match shortly.

EDIT: Updated to the new design.

1 Like

Hello Sam! Nice work on the simple code btw and thank you for the reply.

I think you miss the point of the example here or I am missing something. The point here is that if the USD value of the stablecoin being exchanged for DAI is depressed we can run into a situation where the PSM is DC maxed. To be fair with the current OSM USD prices on USDC being locked to 1 this hazard exists now. These are the only vaults and collateral types where Maker has locked the OSM prices to $1 and this lock opens up a value hazard if for any reason the stablecoin prices with locked OSM USD prices drop in USD value below the PSM profit margin.

This is a general issue here due to the OSM stablecoin prices being locked at $1 USD and I wondered if the stablecoin OSM prices were to change whether this code would obey those somehow or whether it would ignore them.

I’m not sure if I quite follow. The amount of USDC needed to restore the peg is about 400M, so I don’t foresee any large slippage on USDC/USD with the hard peg in place.

I’m concerned about what would happen if USDT lost its peg, if anyone can trade it 1:1 for DAI how could we keep our peg?

PSM will only work with USDC to start and we, the community, at Maker do not like/trust USDT so I don’t think USDT will ever get added and if it did the DC on it would be very small as to not have too much exposure to that risk.

I’m going to assume you meant USDC instead of USDT. If USDC looses its peg then we would need to take on debt equivalent to the losses same as any other collateral type.

PSM is in front of a vault, and as any vault there is a ceiling.

If the usdc lost its peg, the usdc PSM vault will get full as the USDC-A and B vault.

Both vault carry the same risk.

I am not sure if that answers your question.

Please note I have submitted MIP29 for January’s governance cycle.


This mip was accepted 01/28/21 with the January MIPs bundle