UMA Protocol

How does UMA's Oracle work?

UMA's Optimistic Oracle allows contracts to quickly request and receive data information. The Optimistic Oracle acts as a generalized escalation game between contracts that initiate a price request and UMA's dispute resolution system known as the Data Verification Mechanism (DVM). Prices proposed by the Optimistic Oracle will not be sent to the DVM unless it is disputed. This enables contracts to obtain price information within any pre-defined length of time without the need to have the price of an asset written on-chain.
If a dispute is raised, a request is sent to the DVM. All contracts built on UMA use the DVM as a backstop to resolve disputes. Disputes sent to the DVM will be resolved 48 hours after UMA tokenholders vote on the price of the asset at a given time.

Optimistic Oracle

  1. 1.
    Requestors ask for the price of an asset at a given time. A requestor submits the following information to request a price:
    • identifier: price identifier being requested.
    • timestamp: timestamp of the price being requested.
    • ancillaryData: ancillary data representing additional arguments being passed with the price request.
    • currency: ERC20 token used for payment of rewards and fees. Must be approved for use with the DVM.
    • reward: reward offered to a successful proposer. Will be paid by the caller. Note: this can be 0.
    Note - the contract requesting the price does not need to be registered with UMA’s DVM
  2. 2.
    Proposers respond to price requests by referencing off-chain price feeds to submit the price of an asset. In return for their work they will receive a pre-defined proposal reward set by the Requestor. To propose prices, the Proposer is required to stake a proposal bond. In the event that the price information they proposed is disputed and deemed incorrect, the Proposer will lose their bond.
  3. 3.
    Disputers can refute a price submitted by a Proposer within the proposal liveness period by referencing their own off-chain price feeds. The proposal liveness period is a pre-defined amount of time a proposal can be disputed before the Requestor receives the price of the asset.
  4. 4.
    If Disputers do not refute the price submitted by the Proposer within the proposal liveness period, the price is sent to the Requestor.
  5. 5.
    If a proposal is disputed, the price will be submitted to UMA’s DVM and resolved after a 48-96 hour voting period.

UMA's Data Verification Mechanism

The Data Verification Mechanism (DVM) is the dispute resolution service for contracts built on UMA Protocol. Disputes occur via two channels:
  • Disputes from the Optimistic Oracle
  • Disputes from contract liquidations
  1. 1.
    In the event of a dispute, a price request is submitted to the DVM which proposes a vote to UMA tokenholders to report the price of the asset at a specific timestamp.
  2. 2.
    The vote will conclude after a 48-96 hour voting period resulting in a resolved dispute.
  3. 3.
    UMA tokenholders will reference the price identifier's UMIP to determine how to calculate the price of the asset via off-chain price feeds and record the price of the asset in UMA's Voter dApp.
  4. 4.
    The DVM will aggregate votes from UMA tokenholders to determine the final price of the asset for a given timestamp. If the price returned by the DVM concludes the Disputer was correct, the Proposer or Liquidator (depending on where the dispute derived from) will lose the bond that was staked and the Disputer will be rewarded. If the DVM concludes the Proposer or Liquidator was correct the disputer will lose its dispute bond and the Liquidator or Proposer will be rewarded.
The DVM is powerful because it encompasses an element of human judgment to ensure contracts are securely and correctly managed when issues arise from volatile (and sometimes manipulatable) markets.
UMA's oracle system is constructed with economic guarantees around the cost of corrupting the DVM to ensure it will cost more to corrupt the oracle (i.e., obtain 51% or more UMA tokens) than the amount someone could profit from corrupting the oracle (i.e. stealing funds within contracts on UMA).