Concepts

Orders and sides

Every swap starts as one wallet's order and becomes a position when another wallet takes all of it.

Two sides#

Long crestShort crest
Receivesthe crestthe fixed rate
Paysthe fixed ratethe crest
Is paid whenthe crest beats the fixed ratethe crest falls short of it
Worst epochthe crest at zerothe crest at the cap
Who it suitstraders with a view on Solana activityvalidators, LST issuers and stakers whose income rides on tips

Whatever one side is paid in an epoch, the other side pays. There is no third party in the payment.

Making an order#

An order sets three things:

  1. A side for the maker: long crest or short crest.
  2. A notional in SOL.
  3. A fixed rate, a whole number of the market's ticks, at or below its cap.

Placing it creates a new account for the order and funds it with your deposit. As the maker you also pay the account's rent, about 0.002 SOL, which comes back to you when the account closes.

Taking an order#

Orders match whole: the taker takes the full notional at the maker's rate, on the opposite side. Taking adds the taker's own deposit to the same account, and from then on the account is the position, with one balance for each side. A wallet can't take its own order. The take names the side, notional and rate you saw, so if the maker cancelled and placed a different order under the same number in the meantime, your transaction fails instead of taking it.

Reading the book#

The app lays out the book from the taker's side, so each column is named for what you get by taking from it:

  • Receive fixed lists long-crest orders. Taking one makes you short crest: you receive the fixed rate and pay the crest. Higher rates are better for you, so they come first.
  • Receive the crest lists short-crest orders. Taking one makes you long crest: you receive the crest and pay the fixed rate. Lower rates are better for you, so they come first.

On the chart the same orders float as markers at their rates: orange for orders whose maker receives the crest, light blue for orders whose maker receives fixed. A larger marker is a larger notional.

Cancelling#

While nobody has taken it, an order can be cancelled by its maker at any time, even after its market has started. Cancelling returns the whole deposit and the account rent, and closes the account.