Skip to content

Math appendix

This page gives the formulas the futures program and the oracle apply, with their rounding. They are here so you can check results. They are not a pricing model, and nothing here is a quote. The programs’ own arithmetic is the authority.

Quantity Unit
Oracle index values 6 decimal places. An index level of 100 is 100_000_000.
Grid positions lo, hi Whole steps of the market’s grid. On Amoeba’s markets one step is one index point, and the grid runs from 0 to 200.
k Atoms one lot of a one-step claim pays in full. 10,000 on Amoeba’s markets: $0.01 per lot per point.
Fine units 1/k of a step. Entries and the settlement value are measured in them.
USDC 6 decimal places. 1 USDC = 1_000_000 atoms.
Basis points (bps) 10,000 bps = 100%.

trunc rounds toward zero. floor and ceil round down and up. clamp(x, a, b) is min(max(x, a), b).

The final index for a market is built from the movement of each oracle source since its opening value. The program works in whole basis points.

delta_s = trunc(10000 × (P_s − P_s,0) / P_s,0) one source, in bps
d_b = median of eligible delta_s in bucket b in bps
index_bps = Σ_b trunc(d_b × w_b / 10000) bucket weights: Σ_b w_b = 10000
V = floor((B × (10000 + index_bps) + 5000) / 10000) final index, rounded half up
  • P_s,0 is the source’s accepted opening value. P_s is its settlement value, defined below.
  • w_b is the fixed weight of bucket b in the product. Every eligible source in a bucket counts equally. Bonds and support capital never weight a source.
  • B is the oracle month’s settlement base. With B = 100, a weighted move of +300 bps settles the index at 103.
  • index_bps cannot be below −10,000.

A source’s settlement value. Let T be expiry. Step back from T one day at a time until five UTC weekdays (Monday to Friday) have been counted. Call that point W. P_s is the median of the source’s accepted values with timestamps from W to T, inclusive. With an even number of values, it is floor((a + b) / 2) of the middle two. If the source has no value in the window, its latest accepted value at or before W is used. That carried value is not a new update. A source with no usable value is not eligible.

A bucket’s median. With an even number of eligible sources, d_b is the average of the middle two, truncated toward zero. A bucket needs at least max(3, ceil(n / 2)) eligible sources, where n is the number of sources frozen for that bucket for the month. If it has fewer, the program re-runs the bucket once with a 10-weekday window. If it is still short, the bucket goes to the oracle council. The council can confirm the bucket’s measured median, d_b computed as above over its eligible sources, or keep its last accepted value; without three matching votes the bucket keeps its last accepted value.

The settlement value cannot be finalized earlier than 24 hours (86,400 seconds) after expiry. That time is reserved for evidence and disputes.

The market reads its oracle period. With the period’s settlement value V (6 decimals) and step_value, the oracle units per grid step (1_000_000 on Amoeba’s markets):

S = floor(V × k / step_value) in fine units (1/k step)

An index of 103.456789 settles a market at S = 1_034_567, that is 103.4567 points. If the council acts on a period still unsettled after expiry, S comes from the value the governance council sets, in the same units.

A claim is a side, an interval [lo, hi) and a number of lots. Per lot, in USDC atoms:

set = (hi − lo) × k
long(S) = clamp(S − lo × k, 0, set)
short(S) = set − long(S)

Because S is in fine units, every payout per lot is a whole number of atoms, and a long plus a short on the same interval pay exactly set. With k = 10,000, a long on 90–110 settling at 105 pays clamp(1_050_000 − 900_000, 0, 200_000) = 150_000 atoms, $0.15, per lot.

A claim opens at a price p per lot, in atoms, with 0 ≤ p ≤ set. The API calls it premium. It places the entry on the price line:

entry (fine units) = lo × k + p
entry (index) = lo + p / k
long pays = p × lots
short pays = (set − p) × lots

A fill’s average entry is lo × k + max(P, 0) / lots, with P the fill’s total price. Leverage at an entry E:

long: L = E / (E − lo) so lo = E − E / L
short: L = E / (hi − E) so hi = E + E / L

The web ticket and Petri place the losing end from the leverage you choose, on the grid, and the winning end where you choose. At E = 100 a 50× long on 98–120 pays 2 points per lot and a 5× short on 98–120 pays 20; together they hold the set, 22 points.

What Holds or releases, per lot
Resting long at limit p holds p
Resting short at limit p holds set − p
Resting close order holds its claim, no cash
Maker ladder step holds bid per bid lot and k − ask per ask lot (one-step sets)
Long and short of one owner on the same interval redeem for set into free cash
Selling a long at p free cash gains p
Buying back a short at p free cash gains set − p

Intervals that differ in either end are not complements and release nothing. Split divides a claim exactly: [a, c) = [a, b) + [b, c).

After every instruction the program checks:

custody = deposits − withdrawals = free + reserved + backing
reserved = the escrow of every resting order and ladder
backing = k × long coverage = k × short coverage while the market is open
backing = what the remaining claims pay once it is final

There are no fees and no funding, so every atom deposited is withdrawable as free cash, held as escrow, or backing a claim.

The Earn vault’s value is its idle cash plus, in each of its markets, its trader’s free and reserved cash and what its claims and ladder inventory pay. Payoffs are linear between grid positions, so one sweep over each market’s grid gives that market’s lowest and highest value over every settlement outcome; the vault’s V_low and V_high add them up with the idle cash. With N shares outstanding:

shares for a deposit of x atoms = floor(x × N / V_high) (x when N = 0)
atoms for n shares = floor(n × V_low / N) paid from idle cash, then the vault's cash in its markets

A settled market’s part has one value, so V_high − V_low is the range of the open positions. Where a market’s free cash is short, a withdrawal retires the vault’s ladder there to release its escrow. The last shares wait while V_high is above what they would get. See Earn.

The suggested range is index ∓ 2σ, rounded to whole grid positions and kept within the span the maker quotes. With a live maker ladder, σ is half the distance between the settlements the book prices at an 84.1% and a 15.9% chance of being exceeded: a one-step claim [x, x + 1)’s mid price over k is about the chance the index settles above x + 1/2. Without a ladder, σ = index × vol × √T, with T the time to expiry in years and vol the index’s annualized realized volatility over its last 30 days of samples (40% a year when there are too few). Chart values, the oracle reference index, the suggested range and P&L at the index are explanations. They are not quotes or inputs to the program’s checks.