Documentation · method v0.1 (draft)

How TERAZI works

Overview

TERAZI measures the Turkish USDT premium: how many more (or fewer) lira a buyer pays for one USDT on Turkish exchanges than the official dollar rate implies. The figure is published every minute, free and without a wallet. On top of it runs a weekly market, TR-USDT-W1, in which both sides lock their full potential loss as collateral.

The name is Turkish for “scales”: the local USDT price on one pan, the official dollar rate on the other.

Status: draft. Parameters marked calibrate will be fixed after a backtest of the premium's history, before the first series is listed.

Index method

For every UTC minute t and series expiry E:

Local(t)   = median of valid USDT/TRY closes at t
             on BtcTurk, Paribu and Binance TR
FX(E)      = TRY per EUR (E) / USD per EUR (E)        ← ECB reference rates
premium bp = 10,000 × ( mean of counted Local(t) / FX(E) − 1 )

For BtcTurk and Binance TR a close is the last traded price of a completed one-minute candle, matched by venue and UTC minute. Paribu publishes no candles, so its value for a minute is the last price on its public ticker, captured within 20 seconds after that minute ends. Every counted minute has equal weight and the whole window uses one FX denominator: the ECB fix published for the expiry date. Arithmetic is exact rational; the result is rounded to the nearest whole basis point, ties away from zero (+0.5 → +1, −0.5 → −1).

Example. ECB legs of 55.00 TRY/EUR and 1.1000 USD/EUR give exactly 50.00 TRY/USD. A local median of 50.40 is +80 bp; 49.85 is −30 bp.

The settlement window is [E − 24h, E): 1,440 minutes, the minute starting at E − 24h included, the minute starting at E excluded. The specification is hashed (SHA-256 over its RFC 8785 canonical JSON) and pinned in every series as methodHash.

Data quality

RuleDefinition
Valid closeFinite, positive, in the matching UTC minute. Malformed or conflicting duplicates are rejected; exact duplicates collapse.
Outlier venueWith three valid closes, a venue more than 1% from the minute's median is dropped. Calibrate.
Counted minuteAt least two valid, non-outlier venues. With exactly two, they must be within 1% of each other and the minute uses their mean.
CoverageAt least 1,368 of 1,440 counted minutes and no run longer than 15 uncounted minutes, edges included. Gaps are never filled.
FXBoth ECB legs for the expiry date, captured before the freeze. Missing or mismatched FX voids the week.
Live displayA minute older than 2 minutes is flagged stale. No live figure if the latest ECB fix is older than 96 hours.

Contract terms

TermValue
SeriesTR-USDT-W1-YYYYMMDD, expiry Friday 16:00 UTC (19:00 Istanbul).
TradingOpens at E − 7 days, closes at E − 24h — no trading while the result is being measured.
BandL = −300 bp, U = +300 bp. Calibrate. Quotes strictly inside the band, 1 bp ticks.
Lot10 USDG per percentage point (0.10 USDG per bp). A matched pair locks (U − L) × 0.10 = 60 USDG per lot.
OrdersWhole lots, one immutable price per offer, partial fills allowed. Posting escrows the maker's collateral; taking matches one offer directly and reverts in full on overfill. Makers can cancel unfilled lots at any time; after cutoff anyone may release them back to the maker.
Fees0 trading fee at launch. Gas in ETH.
CollateralUSDG (Global Dollar, Paxos) on Robinhood Chain, 6 decimals.

Collateral and payouts

With entry e, lots q, m = 0.10 USDG per bp and S the rounded premium clamped to [L, U]:

LongShort
Collateral at fillq × (e − L) × mq × (U − e) × m
Payoutq × (S − L) × mq × (U − S) × m
Profit / lossq × (S − e) × mq × (e − S) × m
On voidcollateral backcollateral back

Worked example. A maker posts 4 long lots at +50 bp and locks 4 × 350 × 0.10 = 140 USDG. A taker shorts 3 of them, locking 3 × 250 × 0.10 = 75 USDG. The maker cancels the fourth lot and gets 35 USDG back. If the week settles at +120 bp, the long receives 3 × 420 × 0.10 = 126 USDG (+21) and the short 3 × 180 × 0.10 = 54 USDG (−21). At a raw +450 bp, clamped to +300, the long receives all 180 USDG in escrow.

Settlement and disputes

WhenWhat happens
E + 1hSource data freezes; the manifest is built from the archive.
[E + 1h, E + 6h)Anyone may relay one report signed (EIP-712) by two of the three pinned reporters. The contract checks method hash, FX date, coverage and gap rules.
E + 6hNo accepted report → anyone may void. Late reports are rejected.
[P, P + 12h)Anyone may challenge once with a 25 USDG bond and an evidence digest. Unchallenged → anyone may finalize at P + 12h.
[C, C + 24h)The reviewer multisig upholds or voids — it cannot set another value. No decision → anyone may void at C + 24h. Bond refunded on void, kept by treasury if upheld.
FinalAnyone can trigger a claim for any wallet; funds only go to that wallet. Unmatched offers stay reclaimable.
Report(uint256 seriesId, uint64 expiry, bytes32 methodHash,
       bytes32 evidenceDigest, int32 rawBp, uint16 countedMinutes,
       uint16 longestGap, uint32 fxDate)
domain: name "Terazi", version "0.1", chainId 4663, verifyingContract = series

Evidence and replay

Collectors keep every venue and ECB response as original bytes, with source, request range, capture time, HTTP status, parser version and SHA-256. During [E, E + 1h) the full window is fetched again in pages. The manifest lists each source file, the 1,440 minutes in UTC order with every venue's close, each rejected minute with its reason, the FX legs and the exact and rounded result. Its canonical bytes are hashed; that digest is what reporters sign.

A single-file Node tool, terazi-replay.mjs, will download a series' evidence, verify every checksum, re-parse the original bytes, re-apply the rules and print the digest to compare with the on-chain report. The same calculator runs in the browser on the Verify page.

HTTP API (planned)

Read-only JSON with CORS. Premiums are integer bp, token amounts are decimal strings in 6-decimal units, timestamps UTC ISO 8601.

EndpointReturns
GET /v1/indices/TR-USDT/latestLive premium, venue closes, median, FX legs, quality flags.
GET /v1/indices/TR-USDT/historyMinute history, up to 14 days.
GET /v1/series, /v1/series/{id}Listed series, phase, terms, best quotes, matched lots.
GET /v1/series/{id}/offers, /fillsOrder book and trade history.
GET /v1/accounts/{wallet}Positions, reserves and claimable amounts.
GET /v1/series/{id}/settlement, /manifestDigest, signatures, deadlines, canonical manifest.
GET /v1/evidence/{sha256}Any archived source file, as original bytes.
GET /v1/healthFeed freshness, indexer lag, contract addresses.

Roles and keys

RoleCanCannot
Administrator (Safe multisig)List future series.Edit a listed series' method, deadlines or funds.
Guardian (same Safe)Halt new posts and fills in a series.Block cancels, reports, challenges or claims.
Reporters (3 keys)Sign manifests after the freeze; 2 of 3 required.Sign a value the contract's rule checks reject.
Reviewer (Safe, pinned per series)Uphold a challenged report or void the week.Set a different value.
KeeperRelay reports, run timeouts and claims.Anything a regular wallet can't — all keeper actions are permissionless.

Calendar

A week is listed only if the ECB publishes a fix on its expiry Friday. Fridays on TARGET holidays — Good Friday, 25 December, 1 January when they fall on a Friday — are skipped. Turkish public holidays do not void a week by themselves, since crypto venues trade around the clock, but the coverage rules still apply.