Optimistic Market Maker

Some rough notes on a potential UMA use case, blending my ideas around an optimistic DEX and an optimistic paymaster into the same contract system.

The Optimistic Market Maker is a smart contract system with pooled ETH that accepts bonded optimistic prices for various tokens from any proposer and uses those prices to buy tokens for slightly less than that price, and resell those tokens at slightly more than that price.

The sellers are willing to sell for less than the global price because the OMM price may still be better than those available on AMMs on that particular chain (and takes CEX prices into account). The buyers are happy to buy at a price lower than the global price, either to hold or to execute some cross-chain arbitrage. This also allows for tokens to accumulate from multiple sellers and then be scooped by one buyer when it’s worth it.


Global Price: $10
OMM Bid: $9.95
OMM Ask: $9.90 [zero slippage]
AMM Price: $9.90 [plus/minus slippage]

Prices will need to dynamically adjust according to smart contract rules in addition to the global price provided by price proposers. There has to be some protection from bank runs if one token collapses. Approved tokens, token weights, and price adjustment variables should be approved by governance of LPs. The LPs only deposit WETH and withdraw WETH.

An important extension of the OMM protocol is the ability to pay gas fees in any approved ERC20 token. This also drives more demand from sellers, since being able to pay gas in an ERC20 token rather than holding ETH is valuable. To accomplish this, the OMM contract needs the ability to relay any arbitrary transaction through a smart contract wallet owned by the sender. The OMM can also create a smart contract wallet for them, if desired.

Because many chains use a different gas token than ETH, the pooled liquidity in those chains should be denominated in their native gas token, rather than ETH, to facilitate this gas payment functionality.

Another extension would be allowing LPs to withdraw a basket of tokens rather than withdrawing ETH/WETH. This allows them to buy a token index (or one of many token indices) fairly easily.

The global price is reported optimistically, so the failure of any one data source shouldn’t be a problem. If a proposer is disputed, or trading has matched the size of the bond, you can toss their proposal and re-open trading when there is a new bonded proposal. I also think a proposal in this system should be a bundle of prices for all approved tokens.

Another detail: There should be a small extra bond for disputers. So if the proposer is pricing $1M in trades, and there is a $4K bond for successful disputers, the proposer posts a bond of $1,004,000, but the disputer posts a bond of $4,000. On a successful dispute, the LPs receive the amount paid out for trades on those prices, the disputer receives the $4,000 bond, and the proposer receives the remainder. So if there is only $600,000 in trades against the bad price bundle, the proposer gets $400,000 back.

I call this the Optimistic Market Maker but it’s also a Universal Market Maker, since it can execute trades against any approved asset.