Sumero
Search
K

Expiring Multi Party

What is an EMP contract?
Sumero uses UMA's Expiring Multi Party (EMP) Contracts to create Clay Synthetic Assets (cSynths). As UMA has deprecated these EMP contracts, Sumero has forked and created our own version of the EMP contracts which can be found here.
The ExpiringMultiParty (“EMP”) contract is the main star of Sumero. It’s what enables us to create a synthetic out of virtually any publicly available statistic. In theory, this could be anything from CPI and some currency index, to something as wacky as “an asset whose price follows the number of free throws LeBron James makes in a month”. Every EMP contract represents a new type of synthetic asset, from which an unlimited amount of the synthetic token can be minted, given the sponsors supply enough collateral. Each EMP has an expiration date, where all sponsors and all holders of the synthetic token can “settle” for the underlying collateral. The UMA team wrote the original EMP contract but stopped maintaining it recently. Thus we’ve had to fork the code, and have made a variety of changes to suit our needs. For the purposes of this document, see the EMP code here, which tracks the latest changes to the EMP code.

Main Terms

  • Sponsor: An Ethereum agent that provides USDC as collateral to the EMP contract, in exchange for freshly minted synthetic tokens for the contract.
  • Liquidator: An Ethereum agent that has started a liquidation claim on a sponsor’s position. This may be an attempt to liquidate the whole position or only a part of it.
  • Disputer: An Ethereum agent that has disputed an active liquidation.
  • Optimistic Oracle: UMA’s system for answering queries for different prices or numerical values.

File Structure / Inheritance

PricelessPositionManager allows sponsors to put up collateral and mint a synthetic asset. Liquidatable inherits PricelessPositionManager, and allows anyone to create, dispute, and resolve liquidations for any EMP sponsor’s position. ExpiringMultiParty inherits Liquidatable without adding any functionality, and is created through the use of ExpiringMultiParyCreator.

PricelessPositionManager

This contract handles the logic relating to:
  • Holding/managing collateral for sponsors, and allowing the minting of the synthetic asset
  • Managing positions: withdrawing, adding/removing collateral, paying back the synthetic debt
  • Upon expiration, allowing all sponsors and all synthetic asset holders to “settle” and receive underlying collateral from the contract.
A good way to think about this contract, in isolation from what inherits it, is that this contract would allow synthetic assets to be safely created if we assume that all sponsors will keep their position solvent, without needing any incentive to do so.

Liquidatable

This contract handles the logic of creating, disputing, and settling liquidations, and ultimately relies on UMA’s OptimisticOracle to settle any disputes. This introduces the incentives and game theory to give strong guarantees that the EMP as a whole remains solvent throughout its life. An Ethereum agent who holds some of the respective synthetic asset tokens can begin liquidating any position at any time, but they must also include a bond of the collateral currency. If it’s not disputed within a time limit, the system assumes the liquidation is legitimate and awards the liquidator: the synthetic asset provided is burned, and the underlying collateral is returned to the liquidator, which should be worth more than the synthetic asset, thus providing the incentive for the liquidator. The bond is also returned to the liquidator. This also punishes the sponsor. In this case, the OptimisticOracle is not even queried. However, any liquidation can also be disputed by any agent with enough collateral to put their own bond of collateral currency up. In this case, a price is requested from UMA’s OptimisticOracle, and the bond amount is sent with the request. UMA’s OptimisticOracle eventually returns a price (using the priceIdentifier and possibly ancillaryData set upon EMP creation to know how to calculate the value). The EMP logic uses this returned price to determine whether the liquidation was legitimate or not. If it was legitimate, the liquidator “wins” and gets an outcome similar to if the liquidation was never disputed, while the disputer loses his bond. If not, the liquidator loses his bond, and the disputer is the one who is rewarded. So: the game theory here relies on an “end game” dispute, which will in theory always reward the agent that was able to correctly identify whether a liquidation was necessary. This motivates liquidators to try to only liquidate at-risk positions, and disputers to watch liquidations for invalid liquidations where the position was not actually at risk. It also motivates sponsors to watch their positions and keep them over-collateralized, to avoid liquidation.