Lull

Concepts

Popen

How the open price is taken from Pyth, what happens when it is uncertain, and when a lull is cancelled instead.

Popen is the price every order in a lull crosses at. It is the first verified Pyth price of the underlying stock published at or after the open plus a short delay. For AAPLx/USDC the feed is Equity.US.AAPL/USD: Pyth's price of Apple shares in the US regular session, in USD per share.

The source#

The program reads a Pyth price update account on Solana. Two kinds qualify: the feed account that Pyth keeps updated, and an update that anyone posts through Pyth's receiver for the occasion. Before it accepts either, it checks that:

  • the account is owned by Pyth's receiver program and holds a price update;
  • the update is fully verified;
  • it belongs to the market's feed;
  • the price is above zero;
  • it was published inside the capture window below.

The open delay and the capture window#

Call the open plus the market's open delay start. The delay is 30 seconds by default. It skips the first seconds of the session, while opening prints settle.

A price qualifies when it was published between start and start plus the market's maximum lag (30 seconds by default). It can be captured from start on.

Capture is permissionless, and the first valid capture wins. Whoever sends it can only choose among prices published inside that window.

Lull's crank does not wait for the feed account. It fetches the first Pyth update at or after start from Pyth's price service. It posts that update through the receiver with every guardian signature verified, and captures from it in the same transaction. If that path fails, the crank captures from the feed account, 15 seconds after start.

The confidence gate#

Each Pyth price comes with a confidence interval. If the interval, relative to the price, is within the market's limit (25 bps by default), that price is Popen. The lull records its source as direct.

If the interval is wider, the lull does not trust that one price and switches to sampling. It collects further verified updates, each with a later publish time than the one before. Once the TWAP window (60 seconds by default) has passed since the first sample, and at least the minimum number of samples (3 by default) is in, Popen is the mean of all the samples, the first one included. The lull records its source as TWAP.

Every sample must be published within the TWAP window plus the maximum lag, counted from the first sample.

The exactness flag#

The feed account holds whichever update was posted to it last. A capture from it is therefore a valid price from the capture window, but not always the very first update after start. A capture from the update Lull's crank posts is the first one.

Each lull records an exactness flag. It is set when the captured update's previous publish time is before start. That proves the update is the first Pyth price at or after start. A TWAP price is never flagged exact.

The price, its source and the flag are stored on chain for every lull. The lull page shows Popen.

The Scaled UI multiplier#

The AAPLx Scaled UI multiplier is read from the mint in the same step as the price, and the cross uses that value. See Units.

When there is no price#

If no valid price arrives by the pricing deadline, the lull cannot cross at a trustworthy price. The deadline is:

open + open delay + 2 × maximum lag + TWAP window

With default parameters, that is 2 minutes 30 seconds after the open. Once it passes, anyone can cancel the lull.

The market authority can also cancel a lull at any time before it is priced, for example when trading in the stock is halted. A lull cancelled before or during its reveal window accepts no further reveals.

In a cancelled lull nothing trades. Claim returns every revealed lock to its owner's free balance, together with the bond and rent. Unrevealed tickets are forfeited as in any lull. See Bonds and forfeits.

Connect a wallet

No Solana wallet was found in this browser. Install one, then reload this page.

Lull asks the wallet to sign each transaction. Hardware wallets that connect over USB are not offered.