Skip to content
Michael Huang edited this page Feb 15, 2019 · 20 revisions

VegaRelay

VegaRelay is a 0x-relayer that hosts order books for volatility markets on Augur. Each market on VegaRelay represents a derivatives contract with pre-defined terms that specify the underlying asset, the strike price, and the expiration and optionality of the contract. Users can purchase shares of a derivatives contract to speculate on/hedge against the price of the underlying at the contract’s expiration.

Try out our demo on Rinkeby and vote for us on Coinlist!

Purpose

Inspired by the team at Veil, who created the first 0x-Augur relayer, we wanted to create similar relayer that curates a set of Augur markets with special payout functions.

0x allows cryptographically signed orders to be broadcasted off the blockchain. By exposing Augur markets to 0x, we can provide users with a frictionless trading experience on our volatility markets. No on-chain transactions are needed for trading.

Augur Basics

Reporters

Reporters are stakeholders in the Augur ecosystem who are responsible for determining the outcome of each prediction market.

Complete Sets

In an Augur market, a Complete Set is a collection of shares in every outcome. For instance, in a scalar market, you can always escrow 1 Ether to receive 1 Complete Set (1 “Long” share token and 1 “Short” share token), or you can return 1 Complete Set to retrieve 1 Ether from the market.

Outcome shares have this property because a Complete Set of shares represents a neutral portfolio in a market—regardless of the ultimate outcome, the set of share tokens will ultimately sum to 1 Ether. [1]

Scalar Markets

Scalar markets on Augur allows for two types of shares— “Long” and “Short”. Each share in a market comes into existence as a part of a Complete Set. The payout of one “Long” share and one “Short” share always sums to 1 Ether. Shares in a scalar market represent directional bets between a minimum price and a maximum price. We denote Ticks as a unit to denominate the smallest unit of precision between the minimum price and maximum price. So rather than fixating on two specific outcomes (as in a YES/NO market), traders in a scalar market bet on the closest Tick the market resolves to.

Let’s create a hypothetical scalar market where participants place bets on the price of Ether 30 days from now. Let’s say the price of Ether is $100 today, and we set the parameters for our scalar market to have a minimum price of $50, a maximum price of $150 and 100 ticks between the minimum and maximum price. In this market, the “Long” shares are worth more if the price of Ether resolves closer to $150 after 30 days and “Short” shares are worth more if the price of Ether resolves closer to $50 after 30 days. Specifically, the payout of each “Long” share and “Short” share are described by the following function:

ScalarMarketPayoffFunction

Image Source: Veil's Guide to Augur Economics

Below is a graph showing the payout of “Long” and “Short” share tokens for the previously described market,

ScalarMarketPayoffDiagram

In the default case, a derivatives contract (represented as a scalar market) on VegaRelay would have a minimum price of 0.00 Ether, the maximum price of 1.00 Ether, and 100 ticks between the minimum and the maximum price. Thus, you can bet on a range of [0.00, 1.00] with a precision of 0.01 between each outcome.

Adding Optionality

When a prediction market expires, the outcomes of the market are finalized and reported through Augur’s decentralized oracle system. We can add optionality to our contract markets by giving reporters special instructions on how the market’s final Tick should be determined. To show how special reporting instructions affect the final payout of “Long” and “Short” share tokens, we will introduce three different flavors of contract markets that can be created on Augur.

Call-Spread Market

Here we describe a Call-Spread Market with the following contract terms:

Contract Property Terms
Optionality CALL-SPREAD
Underlying Asset Ether
Strike Price $500
Expiration 01/01/2020 00:00:00 UTC

We also use default market parameters where the minimum price is 0.00 ETH, maximum price is 1.00 ETH and 100 ticks between [0.00, 1.00].

To allow the “Long” and “Short” share tokens of our contract market to have similar characteristics of call-spread options, we give reporters, who will report on the final outcome of this market, the following instructions:

Let E be the price of last trade on Coinbase Pro for pair ETH/USD in year 2019 (UTC).
Calculate V = (E - $500) / 500.
If V > 1, resolve market as 1.
If V < 0, resolve market as 0.
Otherwise resolve market as V, rounded to the nearest market tick.

In the unlikely event that V falls exactly in the middle between two market ticks, round up.

Long Position

In this market, users would buy “Long” shares to secure the right to buy 1 Ether for $500 on 01/01/2020 00:00:00 UTC. When the market resolves, if ETH price ends up higher than $500, holder of “Long” share will receive 1 ETH - $500. [2]

If ETH price exceeds $1000, the payoff to be received by the holder of “Long” share will be at a maximum of 1 ETH.

Short Position

Users would buy “Short” shares to write an obligation to sell 1 Ether at $500 upon exercise of corresponding “Long” shares. If the price of ETH at the market expiration ends up below $500, they end up with 1 ETH. If the price of ETH at the market expiration ends up above $500, they have to fulfill the obligation, sell 1 ETH to the holder of “Long” share, and end up with $500. In other words, they get 1 ETH or $500, whichever is smaller. [2]

Payoff Diagram

Below is a graph showing the payoff of the “Long” and “Short” share tokens in our call-spread market,

CallSpreadPayoffs

Put Market

Here we describe a Put Market with the following contract terms:

Contract Property Terms
Optionality PUT
Underlying Asset Ether
Strike Price $500
Expiration 01/01/2020 00:00:00 UTC

We also use default market parameters where the minimum price is 0.00 ETH, maximum price is 1.00 ETH and 100 ticks between [0.00, 1.00].

To allow the “Long” and “Short” shares of our contract market to have similar characteristics of put options, we give reporters the following instructions:

Let E be the price of last trade on Coinbase Pro for pair ETH/USD in year 2019 (UTC).
Calculate V = ($500 - E) / 500.
If V < 0, resolve market as 0.
Otherwise resolve market as V, rounded to the nearest market tick.

In the unlikely event that V falls exactly in the middle between two market ticks, round up.

Long Position

In this market, users would buy “Long” shares to secure the right to sell 1 Ether for $500 on 01/01/2020 00:00:00 UTC. When the market resolves, if ETH price ends up lower than $500, holder of “Long” share will receive $500 - 1 ETH.

Short Position

Users would buy “Short” shares to write an obligation to buy 1 Ether at $500 upon exercise of corresponding “Long” shares. If the price of ETH at the market expiration ends up above $500, they end up with 1 ETH. If the price of ETH at the market expiration ends up below $500, they have to fulfill the obligation, buy 1 ETH from the holder of “Long” share, and end up with 1 Ether. In other words, they get $500 or 1 ETH, whichever is smaller.

Payoff Diagram

Below is a graph showing the payoff of the “Long” and “Short” share tokens our put market,

PutMarketPayoffs

Curved-Call Market

Here we describe a Call Market with the following contract terms:

Contract Property Terms
Optionality CALL
Underlying Asset Ether
Strike Price $500
Expiration 01/01/2020 00:00:00 UTC

We also use default market parameters where the minimum price is 0.00 ETH, maximum price is 1.00 ETH and 100 ticks between [0.00, 1.00].

To allow the “Long” and “Short” shares of our contract market to have similar characteristics call options, we give reporters the following instructions:

[2]

Let E be the price of last trade on Coinbase Pro for pair ETH/USD in year 2018 (UTC).
Calculate V = (E - $500) / E.
If V < 0, resolve market as 0.
Otherwise resolve market as V, rounded to the nearest market tick.

In the unlikely event that V falls exactly in the middle between two market ticks, round up.

Long Position

In this market, users would buy “Long” shares to secure the right to buy 1 Ether for $500 on 01/01/2020 00:00:00 UTC. When the market resolves, if ETH price ends up higher than $500, holder of “Long” share will receive 1 ETH - $500. [2]

Short Position

Users would buy “Short” shares to write an obligation to sell 1 Ether at $500 upon exercise of corresponding “Long” shares. If the price of ETH at the market expiration ends up below $500, they end up with 1 ETH. If the price of ETH at the market expiration ends up above $500, they have to fulfill the obligation, sell 1 ETH to the holder of “Long” share, and end up with $500. In other words, they get 1 ETH or $500, whichever is smaller. [2]

Payoff Diagram

Below is a graph showing the payoff of the “Long” and “Short” share tokens our curved-call market,

CurvedCallPayoffs

Limitations

  • Currently prediction market participants must use Ether as the denomination currency to buy and sell shares. Thus in the markets described above, it is assumed that an option writer (purchaser of short shares) immediately converts his/her “Short” shares to USD (or any stablecoin equivalent) after an exchange. If not, the option writer is still exposed to the volatility risk of the underlying asset. In V2 of Augur, Dai will be used in place of Ether as the denomination currency. Thus, the option writer will not need to convert his/her short shares to a stable asset.
  • On Augur, parity of Complete Sets cannot be broken. As a result, the maximum payoff potential of a call option is always bounded by 1 Ether. This also means that the maximum payoff amount an option writer can lose is also 1 Ether.

Pricing Considerations

TODO

References

  1. Veil's Guide to Augur Economics
  2. Augur CFD (contract for difference) markets