Mitoshi見通しDocs
Open app
How it works

The contracts

What each contract holds and enforces — the engine, its verifiers, the Trading Balance, the house products, strategies, stocks, themes and launchpads.

Checked 2026-10-13 · app 11d85e0

Mitoshi's contracts are Solidity, built and tested with Foundry against Tempo's own EVM rules, and kept under 23.5 KB each. Their ABIs reach the app only through generated code (packages/clients), and their addresses only through the deployment fragments.

The market engine

ContractHolds and enforces
EventsEngineEvery Window's order book, positions and state; placeOrder, cancelOrders, recordPrint, settle, voidExpired, redeem. Ported from Agari's events engine and rewritten for Tempo. One ABI, frozen as engine-abi-v1.
AdminLib · MatchLib · ResolveLibLibraries the engine delegatecalls: listing and series, matching, and prints and settlement.
EngineLensRead-only views: book levels, positions, Window state.
RedStonePrintVerifierAdmits a RedStone package as a print: three of five production signers, close to the boundary.
DataStreamsPrintVerifier · AttestedPrintVerifierThe Chainlink Data Streams path (the stocks' Gap on mainnet) and an attested-print path.

How the engine is built:

  • One book per Window, 1,000 price levels a side, held in bitmaps; order nodes come from one recycled pool, so a fresh order rarely pays for new storage.
  • Positions are free and locked UP and DOWN contracts plus credit. A pair of UP and DOWN merges back to $1; a fill can mint a pair from two buyers.
  • Takers are immediate-or-cancel, with caps on fills and evictions per call. Nothing can take before the opening print.
  • No function takes a payout address: a payout goes to the caller, or to the holder when a settler redeems for them. Accounting never reads the token balance, so a donation can be swept but never counted.

Products on the engine

ContractWhat it is
EventVaultV2The Trading Balance: owners' accounts and grants (SESSION, EXECUTOR, STRATEGY, EXIT).
FairValueGuardThe fair price of a Window's side at a signed RedStone spot, from the opening print, the time left and a per-series volatility. Refuses by name when an input is missing or stale.
MarketMakerVaultThe maker vault Earn supplies.
RangeReserve · ParlayReserve · LeverageReserveThe house reserves behind Range and Moonshot, Parlay, and Boost. RangeReserve was redeployed on 13 October to price every Series on its own or the guard's volatility.
PrivateDeskLink-private bets from a separate balance.
GameArenaDuels: each player's pot, a committed deck, every pick as a real order it holds on the engine, and the award. Ported from Masayume's arena.
StrategyRegistryStrategies, their envelopes, fees, runners and ERC-8004 ids. Never touches money.

Pillar two

Stock mirrors and their bridge adapters, the sync receiver, the scaled views, StockReference and StockGuardHook, the replayed Uniswap v4, ThemeRegistry and ThemeRouter, and the launchpads (LaunchRegistry, CurveLaunchpad, LiquidityLocker). See stocks and tokens.

Verified source

The first Trading Balance, the maker vault, Parlay, Range, Boost, the private desk, StrategyRegistry, the themes contracts, LaunchRegistry, LiquidityLocker and CurveLaunchpad were verified on Tempo's Sourcify (contracts.tempo.xyz) as they were deployed; the acceptance records note each match. The engine, EventVaultV2 and the stock contracts have no such record.

On this page