technical · how it actually works
Five claims, and the evidence for each.
A demo shows that something works. It cannot show whether the integration underneath is real. The two claims you cannot check by reading are executed in the recording below; the other three have their source on this page. The 84-second demo is here.
49 seconds, and nothing in it is pasted. It runs node crank/prove-anchor.mjs and npm run prove on a real machine against mainnet, and shows the output arriving. Both commands are in this repository — the figures will differ from the recording, because the pool moves.
01 · web/lib/pyth.ts
Pyth is read on chain, not fetched from an API
Hermes returns 401 without a key, so the price is read from the receiver program rec5EKMGg6MxZYaMdyBfgwp4d5rB9T1VQH5pJv5LtFJ. getProgramAccounts with a memcmp on the feed id at offset 41, then price at +32, expo at +48 and publish_time at +52 of PriceUpdateV2. publish_time is not incidental — it IS the product's mechanism. When the feed stops, the page says so because the age was measured, not inferred from a calendar.
const RECEIVER = new PublicKey("rec5EKMGg6MxZYaMdyBfgwp4d5rB9T1VQH5pJv5LtFJ"); const FEED_ID_OFFSET = 41; function decode(buf: Buffer) { const o = FEED_ID_OFFSET; return { price: buf.readBigInt64LE(o + 32), expo: buf.readInt32LE(o + 48), publishTime: buf.readBigInt64LE(o + 52), // <- the mechanism }; } const accts = await conn.getProgramAccounts(RECEIVER, { filters: [{ memcmp: { offset: FEED_ID_OFFSET, bytes: key } }], });Offsets verified empirically: 9, 40 and 42 return zero; 41 returns the feed.
02 · web/lib/implied.ts
The implied share price requires dividing by an on-chain multiplier
An xStock is a Token-2022 mint with the Scaled UI Amount extension: the raw balance is fixed and a mint-level multiplier grows to represent more shares. A DEX quotes the RAW token, so the quote is worth multiplier shares, not one. The implied share price is the DEX raw price divided by the multiplier read from the mint. Skip the division and every comparison against an equity feed is wrong by the multiplier.
// A raw token is worth `multiplier` shares. The DEX quotes the RAW token. return { impliedSharePrice: px / mult, rawTokenPrice: px, multiplier: mult }; // ...read straight off the mint, honouring the scheduled change: const effTs = Number(sui.state.newMultiplierEffectiveTimestamp ?? 0); return Number(now >= effTs ? sui.state.newMultiplier : sui.state.multiplier);TLV type 25, body 56 bytes, multiplier at [32..40] as f64. Parsed from live mints.
03 · web/lib/session.ts
The anchor model is measured, and it corrected our own assumption
The build started from the belief that the issuer switches creation and redemption off whenever the market is closed. 5,385 polls between 18 and 23 September say otherwise: the issuer publishes a limit per period — $100M market and extended, $20M overnight, $0 closed. Weeknights throttle. Only the weekend zeroes, observed continuously for 42.1 hours. anchorStateFrom() classifies full / reduced / off from the issuer's own two numbers rather than from a calendar.
export function anchorStateFrom( current: number | null, marketCeiling: number | null, ): "full" | "reduced" | "off" { if (current === 0) return "off"; // weekend: no arbitrage at all if (current === null) return "full"; if (marketCeiling !== null && current < marketCeiling) return "reduced"; return "full"; // weeknights THROTTLE, they do not stop }7 regression tests pin the limit schedule and the weekend boundary.
04 · web/lib/withdraw.ts
The exit is non-custodial and carries a real slippage floor
Raydium's decreaseLiquidity returns a transaction rather than executing one, so the holder signs and there is no keeper, no delegate and no program of ours in the path. The minimums are not zero: withdrawalMinimums() derives them from the position's own tick range via LiquidityMathUtil.getAmountsFromLiquidityWithSlippage with amountMax false, 50bps under the value at the pool's current sqrt price. roundUp is false on both legs, because rounding a minimum UP would set a floor above what the pool can pay and revert an honest exit.
// roundUp=false on both legs: rounding a MINIMUM up would set a floor above // what the pool can pay, and revert an honest exit. const min = LiquidityMathUtil.getAmountsFromLiquidityWithSlippage( sqrtPriceCurrentX64, lower, upper, liquidity, false, // amountMax=false -> the minimum side of the band false, slippageBps / 10_000, );Decoded instruction data on a live position: amount0Min 34749404351, amount1Min 159848267960 — non-zero on the wire. Simulated against mainnet: ok, 65,618 compute units.
05 · crank/
Every headline number is re-runnable
70.9% of volume outside regular session, 0.689% weekend hourly movement against 0.570% in session, 2,777 positions across 76 pools holding $16.2M, and the issuer's delegate and pause authorities used zero times across 17,688 transactions at 100% scan coverage. None of these are quoted from a third party. Each comes from a script in this repo that can be run again.
$ npm run check eslint clean next build Compiled successfully vitest Test Files 3 passed (3) Tests 29 passed (29)lint clean · build clean · 29 tests passing.