Contracts and deployments
In one paragraph. Trion V2 is a set of small, non-upgradeable Solidity contracts wired together at deployment time. Four are shared across markets (registry, price verifier, funding, risk) plus the fixing council, eight are deployed per market (perpetual, orders, strategy policy, closeout router, backstop vault, ADL queue, slow-mode endpoint, writer sleeve), and the options stack adds an engine, pricer, ERC-1155 option token, DLMM resolver and one secondary pool per series. The production deployment is on Robinhood Chain (4663) with USDG collateral: the shared stack and the CMPT perp modules are verified in overdrive/deployments/v2/4663.json, and the CMPT option stack opens at the time on the status page. Only CMPT is deployed; the CMPT perpetual is not listed. A deployment becomes loadable by the matcher, oracle and desk only after a read-only finalizer has verified it against the chain and written the canonical manifest.
Which manifest is which
File under overdrive/deployments/ | Chain | Status |
|---|---|---|
v2/4663.json, v2/4663.perps.json | 4663 (Robinhood Chain) | Live V2. deploymentStatus: "verified", anchored to verifiedGenesisHash and verifiedAtBlock 70212825. Shared stack: registry 0x69345034db2F81836681989cBF3730CC56455033, price verifier 0x2dFC619243fCDc748967868bB63810FD2E8594C5, funding epochs 0xAda07bC360022F70A070a46550f6A0E87c22FD3f, risk engine 0x063077Ed1b52B443004eD1C7823D4C9D52D46c9C, fixing council 0xeffC26eE197554560128c5185200c8828f17D140; governance 0xc37e…e17c; matcher 0x38d8…b406; quote USDG 0x5fc5…d168. One market, CMPT (marketId 0xaee1f7724c3ed0bd1db9034995237b35f87b9250b1a4a0abedacf59530c161de), with its seven perp modules: perpetual 0xdc576130fF0F330D3C0ef5b9a634b8b2C8378dc2, orders 0x6615…BD07, strategy policy 0x75Bb…6C7B, closeout router 0x6597…943C, backstop vault 0x8A4b…9a70, ADL queue 0xeaEC…7ce0, slow-mode endpoint 0x23d8…0782. Read the full addresses from the file, not from this abbreviation. |
v2/retired/4663-2026-09-21-48h/ | 4663 | Retired first deployment: registry 0xce934de2…, price verifier 0x85A0A033…, fixing council 0x64B92e2b…, funding epochs 0x834AC108…, risk engine 0x9fE6222E… and their CMPT perp modules, deployed with a 48-hour registry delay (CMPT activationAt 1790199289 = 2026-09-23 21:34:49 UTC). Never enabled, never funded, not consumed by any loader. Kept as dated history; do not interact with these addresses. |
v2/4663.options.json | 4663 | Live V2 option stack, written by finalize-options-v2.ts at activation: engine, pricer, option token, DLMM resolver, the CMPT writer sleeve, and series[] with seriesId, pool and sleeve for the first call and put. Until the finalizer writes it, the reviewed inputs live in v2/reviewed/ (below). The desk's Transparency page reads the same identities. |
v2/reviewed/4663.options-config.json, 4663.options-series.json, 4663.options-launch.json, 4663.cmpt-options-approval.md | 4663 | Hash-committed review inputs: the CMPT OptionConfig, the first two series (call $2.35→$2.85, put $2.35→$1.85, expiry 1793347200), council seats and bonds, the source recipe, and the approval record whose keccak is the on-chain approvalHash. Inputs, not manifests. |
v2/<chain>.perps.pending.json, v2/<chain>.options.pending.json | any | Written by the deploy/seed scripts. deploymentStatus: "pending"; never loader input. |
v2/4663.perps.dryrun.json, v2/4663.options.dryrun.json, v2/4663.dryrun.json | 4663 | Pre-cutover forge script simulations kept as dated history. Not consumed by any loader; the addresses in them were never broadcast. Do not use them. |
v2/31337.perps.json, v2/31337.options.json, v2/31337.json | 31337 (local) | Local development deployment with MockQuote collateral of no value. See Local development. |
4663.perps.json, 4663.options.json, 4663.json (top level, not under v2/) | 4663 | V1 contracts (TrionPerpetual, TrionOrders, TrionMarketData, …) with USDG quote. Not V2; not covered by this page. |
Only CMPT is populated in the 4663 V2 manifest. main.ts refuses to boot a listed market whose perpetual, orders, verifier or registry address is missing, and re-reads the market's registry identity on every operation (marketStateLoader).
Pending, verified and canonical
flowchart LR
R[Reviewed config JSON\nhash committed] --> D[forge script Deploy*/Seed*\nwrites *.pending.json]
D --> F[finalize-*-v2.ts\nread-only RPC checks]
F -- "genesis + block anchors\ndeploymentStatus: verified" --> C[<chain>.perps.json / .options.json / .json]
C --> M[matcher config.ts]
C --> O[oracle v2-runtime.ts]
C --> W[web v2-config.ts]
- Deploy writes pending only.
DeployV2.s.solrefuses to run if a canonical<chain>.perps.jsonalready exists and writes<chain>.perps.pending.json;DeployOptionsV2.s.solandSeedOptionsV2.s.soldo the same for options. Outside 31337 the scripts require a reviewed configuration file whose keccak hash is passed asPERPS_CONFIG_HASH/OPTIONS_CONFIG_HASH/SERIES_INPUT_HASH, separate private (non-Anvil) identities for governance, matcher and each signer, a six-decimal collateral token, and on 4663 the hard-coded USDG address. - Finalize verifies, never broadcasts.
core/scripts/finalize-perps-v2.tsandfinalize-options-v2.tsread the pending file, re-check every identity, bytecode, registry binding, signer set, activation delay (at least one hour outside 31337:MIN_PRODUCTION_ACTIVATION_DELAY_SECincore/src/v2-bindings.ts, which the runtime bindings also enforce) and reviewed config hash against a fresh RPC read pinned to one block, then write the canonical files withdeploymentStatus: "verified",verifiedChainId,verifiedGenesisHash,verifiedAtBlockandverifiedBlockHash. Existing canonical identities are retained, never replaced or removed ("Refusing to remove canonical perps market"), and the publication is atomic under a cooperative lock. - Loaders demand the anchors.
loadV2DeploymentsFromDisk(core/src/deployments.ts) rejects any manifest without those fields, andbeginV2Verification/finishV2Verification(core/src/v2-bindings.ts) compare the RPC's genesis hash and anchor block hash to them at startup and around every pinned read. There is no fallback to an older manifest shape, a different chain or a local default. - TOKN is zero-exposure by construction. The perps deploy requires TOKN to have zero risk limits, zero source configuration and no funding origin; the options deploy and seed scripts require its issuance config disabled and refuse TOKN series; the options finalizer fails if TOKN is enabled in the registry.
Module responsibilities
Shared (one per chain):
| Contract | Responsibility | Useful entrypoints |
|---|---|---|
MarketRegistryV2 | Immutable market identity (marketId) and versioned listing/risk config. Changes are scheduled with an immutable constructor delay (0 on 31337; elsewhere the required ACTIVATION_DELAY seconds, at least MIN_PRODUCTION_ACTIVATION_DELAY = 1 hours in V2Script.sol; 3 hours on 4663). | getMarket(bytes32), scheduleMarket(...), activateMarket(bytes32), setEnabled(bytes32,bool) |
TrionPriceVerifierV2 | Accepts index/mark snapshots and expiry fixings signed by 2 of 3 authorized signers; enforces freshness, sequence and discontinuity rules. | pushSnapshot(PricePayload,bytes[]), getSnapshot(bytes32), pushFixing(...), getFixing(bytes32,uint64), halt(bytes32,bytes32), rotateSigners(address[3],uint32) |
FundingEpochsV2 | Hourly funding epochs; stores cumulative price rate per market. | finalizeEpoch(FundingPayload,bytes[]), skipEpoch(bytes32,uint32), checkpoint(bytes32) |
RiskV2 | Pure integer IM/MM tiers and equity evaluation. | requirements(uint256,MarketConfig), evaluate(AccountView,PricePayload,MarketConfig) |
Per market:
| Contract | Responsibility | Useful entrypoints |
|---|---|---|
PerpetualV2 | Custody of collateral, segregated freeCash vs trading cash, batch settlement, fee accounting. | deposit(address to,uint96 amount) (needs ERC-20 approve first), withdraw(uint96,address), getAccount(address), preview(address), settleBatch(bytes,bytes), batchSeq(), lastBatchHash() |
OrdersV2 | EIP-712 order digest, signature verification (low-s ECDSA for EOAs, EIP-1271 for contracts), per-order fill/terminal state, account and strategy epochs. | hashOrder(Order), cancel(Order), advanceAccountEpoch(uint32), advanceStrategyEpoch(bytes32,uint32), orderState(bytes32), accountEpoch(address) |
StrategyPolicyV2 | Parent-signed TP / SL / OCO / TWAP policies whose child orders are executed against real maker orders. | executePolicy(StrategyPolicy,bytes,Order[],bytes[],Fill[]) |
CloseoutRouterV2 | Permissionless book-first liquidation with a bounded penalty; backstop assumption when the book cannot absorb. | liquidate(address,uint64), backstop(address,uint64,bytes32) |
BackstopVaultV2 | Funded loss-absorption capital. fund is permissionless and donation-like: no shares, no withdrawal, no yield. Only the perpetual/router can draw on it. | fund(uint96), available() |
AdlQueueV2 | Deterministic on-chain ranking of profitable counterparties for auto-deleveraging. | startAdl(address), buildQueue(uint64), executeAdl(address,uint64) |
SlowModeEndpointV2 | User-initiated exit that can be executed by anyone with real signed counterparties after a grace period, bypassing the matcher. | requestExit(uint64,uint128), executeExit(uint64,Order[],bytes[],Fill[]), requests(uint64) |
WriterSleeveV2 (options) | Fully collateralized option writer capital for one market and one expiry. Shares are an internal non-transferable mapping (no ERC-20). redeemFlat pays only free capital and returns 0 rather than reverting when none is free. | deposit(uint96,address), redeemFlat(uint256,address), available(), shares(address) |
OptionEngineV2, OptionTokenV2, OptionDlmmV2 (options) | Series lifecycle (createSeries, quote, openPosition, settle, severSeries, governanceSettle, claim, closeToRedeem); an ERC-1155 token whose id is the seriesId; and one binned secondary pool per series (addLiquidity, removeLiquidity, swapExactIn, settleDlmmInventory). No protocol fee on issuance; DLMM swap fees (30–250 bps) are credited to bin reserves and realised on removeLiquidity. | see overdrive/src/v2/options/, overdrive/src/v2/dlmm/ |
The full interface set with struct definitions is overdrive/shared/v2/IV2.sol; TypeScript mirrors are generated into overdrive/exchange/core/src/v2-abi/ and exported as v2Abi from @trion/exchange-core/v2-abi.
Deployment shape
overdrive/perps/script/DeployV2.s.sol deploys the shared contracts, then for each selected market computes the market id, schedules it in the registry, precomputes the per-market addresses from the deployer nonce (vm.computeCreateAddress) so constructors can bind immutable peers, and deploys them in that fixed order. Inputs are environment variables: MARKETS, QUOTE, GOVERNANCE, MATCHER, SIGNER0..2, ACTIVATE (local only), and outside 31337 ACTIVATION_DELAY (seconds, at least one hour) and PERPS_CONFIG_FILE/PERPS_CONFIG_HASH. DeployOptionsV2.s.sol (in overdrive/script/) adds the option engine, pricer, token, DLMM resolver and one writer sleeve per market from the reviewed OPTIONS_CONFIG_FILE; SeedOptionsV2.s.sol creates series and their CREATE2 pools from SERIES_INPUT_FILE.
On chain 4663 the script hard-codes CHAIN_4663_QUOTE = 0x5fc5360D0400a0Fd4f2af552ADD042D716F1d168 as the USDG address and requires it to report six decimals; the verified manifest records that same address as quote. The live registry's activation delay on 4663 is 3 hours (10800 s) and is immutable; the CMPT option market's activationAt is 1790147015 (2026-09-23 07:03:35 UTC, 02:03:35 CDT). Options trading opens on 23 September by 08:00 CDT once the option stack is deployed and seeded after activation; the status page is the single source for that.
The launch registry was redeployed with a 3-hour delay so that options could open on 23 September at 08:00 CDT; the first deployment (48 h delay) is retired, never enabled and never funded. It used the same contract code, governance, matcher, signer committee, council seats, bonds and reviewed configuration (reviewedConfigHash 0xd288d961e68c9623d569784f4a314dad863191f7c73ad86f0216c04fb7933ceb in both manifests); only the registry's constructor delay differs.
Options integration status
- Series-scoped UI. In V2 mode
config.tspublishesoptions.marketsfrom the options manifest'sseriesarray (TOKN excluded); each entry carriesseriesId,pool,sleeve, terms and atradingEnabledflag derived from the registry.pages/options.tsandpages/liquidity.tslook a series up byseriesId, readgetSeries, the pool'sseriesId/engine/optionToken/quoteTokenand the sleeve's bindings through the V2 ABIs, and refuse to act on any mismatch.claimis called with the series id and the user's chosen quantity. - Live series. The 4663 options manifest carries the two first-series entries (CMPT call and put, expiry 2026-10-30 08:00 UTC) once seeded and finalized; their
seriesId,poolandsleeveare read from that file and shown on the desk's Transparency page. - Acceptance script.
core/scripts/e2e-v2.tsexercises a writer-sleeve deposit only; it labels that step accordingly ("Issuance, DLMM trading, settlement and buyer claims are not exercised by this step"). The full lifecycle (issuance, DLMM swap, fixing,settle,claim,settleDlmmInventory) is exercised in Foundry tests underoverdrive/test/v2/. - Perp protocol fees:
PerpetualV2.feeCashaccumulates taker fee minus maker rebate and has no withdrawal or recipient function; whatever the protocol would earn is stranded in the contract. There is no fee distributor, staking or emission contract anywhere in V2.
EIP-712 domains
| Domain name | Version | Verifying contract | Signed struct |
|---|---|---|---|
TrionOrders | "2" | market OrdersV2 | Order |
TrionStrategyPolicy | "2" | market StrategyPolicyV2 | StrategyPolicy |
TrionPriceVerifier | "2" | TrionPriceVerifierV2 | PricePayload, FixingPayload, FundingPayload |
TrionPerpetual | "2" | market PerpetualV2 | Batch(bytes payload) |
All bind chainId and verifyingContract, so a signature for one chain or deployment is useless on any other chain or address.
Status and risk
- No independent security audit of these contracts exists. The internal review register (
docs/RELEASE_V2.md§6, REG-01…REG-14) records remediation code against many findings and no third-pass closure review for any of them. - Governance on 4663 is a single address (
0xc37e…e17c), distinct from the matcher and from each of the three oracle signers as the deploy and finalize scripts require, but not a multisig or timelock. All five fixing-council seats are Trion-held at launch. - Perp market configs for every market other than the CMPT option launch remain at their
CANDIDATE_MARKETSdefaults (enabled = false,T = 0, zero caps,riskApprovalHash = keccak("UNAPPROVED")); no perpetual is listed. - Only what the verified manifests record exists. Any other address claiming to be Trion V2 is not.
Source trail: overdrive/deployments/v2/README.md; overdrive/deployments/v2/4663.json, 4663.perps.json; overdrive/deployments/v2/reviewed/{4663.options-config.json,4663.options-series.json,4663.options-launch.json,4663.cmpt-options-approval.md}; overdrive/perps/script/DeployV2.s.sol (CHAIN_4663_QUOTE); overdrive/script/DeployOptionsV2.s.sol, SeedOptionsV2.s.sol; overdrive/exchange/core/scripts/finalize-perps-v2.ts, finalize-options-v2.ts, v2-publication.ts; overdrive/exchange/core/src/deployments.ts (parseVerification, loadV2DeploymentsFromDisk), v2-bindings.ts, v2.ts (CANDIDATE_MARKETS); overdrive/shared/v2/IV2.sol; overdrive/src/v2/options/{OptionEngineV2,OptionTokenV2,WriterSleeveV2}.sol; overdrive/src/v2/dlmm/{OptionDlmmV2,FeeMath}.sol; overdrive/perps/src/v2/{PerpetualV2,BackstopVaultV2}.sol; overdrive/exchange/matcher/src/{main,config}.ts; overdrive/exchange/web/src/{v2-config,wallet}.ts, pages/{options,liquidity,transparency}.ts.
Repository-owned documentation · September 2026 · Educational material, not investment advice and not an audit.
Documentation
V2 · Live on Robinhood Chain