All notable changes to DEX.DO are recorded here. Entries are date-based, newest first.
- inference-market 4.0.28 — PR627 coherence pass: make code, ABI, and canon describe one seller-bond model (owner-approved via dexdo-cli-private PR522/PR627).
- Seller-bond terminology, no dual path. Renamed the seller-collateral entrypoints and surface —
fundProbeCommission → fundSellerBond,postProbeCommission → postSellerBond, eventProbeCommissionFunded → SellerBondFunded, gettergetProbe → getSellerBond(bondFunded/bondHeld/bondRequired), errorsERR_PROBE_*_FUNDED → ERR_BOND_*_FUNDED— and removed the deadSELLER_PROBE_COMMISSION_BPSconstant. No compatibility alias (4.0.28 is not yet deployed). The bond is2Pand the platform fee stays a separate buyer commission. - Note-lock fully removed. Deleted the inert inference note-lock from
PrivateNote(streamLock/streamUnlock/streamDisputeLock/streamDisputeUnlock/getStreamLocks/forceClearStreamLocks, the_streamLocks/_disputeLocksstate and gate, theIStreamNoteinterface,ERR_STREAM_LOCKED, andSTREAM_LOCK_MAX). The per-TC mirror bond is the seller's only at-risk mechanism; notes are never frozen by an inference stream or dispute. PRICE_STEP = 1e9(1 SHELL) confirmed canonical on limit SELL / limit BUY / subscription (market BUY exempt); canon (SELLER_BOND, §3.1.2 burnPvsP, §8 refund-to-buyer) aligned to the model.- Full re-pin to the coherent head:
PrivateNote → 98179ac7,TokenContract → 2f6159b7,RootModel → 9b09eb90,SuperRoot → d35073ec,InferenceOrderBook → d61d91f0,ModelRegistry.IOB_CODE_HASH → f93508a1,RootPN → 25789d96. Local pins.
- Seller-bond terminology, no dual path. Renamed the seller-collateral entrypoints and surface —
- inference-market 4.0.28 — three coordinated changes to the private-inference contracts:
- Subscriptions: unused cycle budget refunds to the buyer (no longer forfeited to sellers). Removed the per-seller forfeit accounting from
InferenceOrderBook(the forfeit-pool / cycle-funded / cycle-seller maps, the cycle-forfeited and forfeit-claimed events, and the forfeit-claim entrypoint) and the matchingPrivateNoterelay. Sellers are still paid per delivered tick in theirTokenContract; the matcher only throttles the weekly spend and returns the remainder to the buyer on cycle rollover, early full-fill, cancel, and expiry — no relationship graph is stored. - Seller collateral: a symmetric mirror bond held in the
TokenContract(spec §4.2). The seller posts a 2-tick bond (fundProbeCommissionnow funds2P, not a small commission) that mirrors the buyer's at-risk depositD. On a dispute that reaches timeout with no concession, the disputedDis burned AND an equalDof the bond is burned (the seller gets nothing from the disputed ticks); the bond returns in full on a clean close, a concession, an abandon, or a seller no-show. Note-locking is removed — both sides' at-risk value lives inside the TC, soPrivateNotestreams are never frozen; a newabandonDisputelets the buyer settle a dispute to the standard split. - Oracle (#588): a normal PMP cancellation now releases the
OracleEventListevent count.PMP.cancelEvent(and the onBounce / rejectEvent cleanup) call_releaseOracleCountsexactly once via a_countReleasedlatch, andOracleEventList.cancelEventguards against underflow — so a normally-cancelled confirmed event decrements its count to zero and can later be deleted. - Full contract-stack re-pin:
InferenceOrderBook → c308b838,TokenContract → c50e36e8,RootModel → 0fa1ef35,SuperRoot → 35258fbb,ModelRegistry.IOB_CODE_HASH → c308b838,PrivateNote → 69948118,RootPN → 662f14ce,PMP → c5da4a1c,OracleEventList → d2278623. Local pins.
- Subscriptions: unused cycle budget refunds to the buyer (no longer forfeited to sellers). Removed the per-seller forfeit accounting from
- Vendored contracts → inference-market 4.0.28:
InferenceOrderBookhardening (issues #558–#567) — true fill-or-kill (per-order simulation), unknown flag-bit rejection,ticks >= 2subscriptions serialized through the match queue with the current-cycle forfeit settled on cancel, bounded expired-GTD cleanup, a terminal result forcancelOrder, POST_ONLY tested against executable liquidity, and a minimum price step of 1 SHELL (order prices must be a whole multiple of1_000_000_000). Re-pinnedModelRegistry.IOB_CODE_HASH → 19014ccc; local pins.
- OrderBook protocol-fee collection:
OrderBookreports its accumulated taker-fee share toRootPN.collectProtocolFeeat shutdown, and the root owner withdraws it viaRootPN.withdrawProtocolFees(with agetProtocolFeegetter).RootPNtracks_protocolFeesper token type; the backing real ECC already sits in RootPN reserves. New eventsProtocolFeeCollected(external id155) andProtocolFeeWithdrawn(156);RootPNABI and docs/contract-specs/dex-events-routing.md updated. The indexer decodes both new events intoraw_events; they have no projector and are stored asUnknown.
GET /api/v1/oracles: public oracle-discovery endpoint returning oracles, their event lists, and available events for market creation. SupportsoracleAddress,eventId,deadlineBefore,cursor, and clampedlimitfilters; pagination is by oracle, ordered by oracle name, then event-list index, deadline, and event id. Response includes list descriptions, per-event oracle fee, trusted address, and sorted outcome labels. Added domain/application DTOs,GetOraclesUseCase, Postgres two-phase listing, API route/OpenAPI output, and DB-backed + HTTP coverage.- Oracle event-list description indexing:
oracle_event_lists.description text not nullis populated fromOracle.OracleEventListDeployed, andOracleEventListcontracts/ABI now carry a deploy-time description plussetDescription/DescriptionUpdated.
- OracleEventList reconciliation now persists
outcomeNamesintooracle_events.outcome_names_jsonbalongsidedescribeandtrust_addr;/api/v1/oracleshides unreconciled events soevents[].outcomesis not empty because metadata has not been fetched yet. docs/api-spec.md,docs/openapi.yaml, anddocs/tech-specs/{read-api,indexer,data-schema}.mddocument the oracles endpoint, availability/filter semantics, schema changes, and current indexer limitations for post-deploy list-description updates.
- Indexer metrics
orders_created_event_cntandorder_partially_filled_event_cnt, exported over OpenTelemetry/OTLP. Both are observable counters derived fromraw_eventstotals (OrderBook.OrderPlaced/OrderBook.PartialFill), refreshed every 15s and pushed every 30s; collection is gated on theOTEL_EXPORTER_OTLP_*env (no-op when unset). Newdodex-metricscrate encapsulates the OTLP setup. See docs/tech-specs/indexer.md.
sdk/: newdodex-sdkcrate — the write-side DEX facade overackinacki-kit(private notes, order book, PMP, oracle/market) plus the halo2 voucher proof pipeline. Kept as its own workspace andexcluded from the root build, since the halo2 pipeline pulls private SSH-only git sources that CI hosts have no key for; build it directly fromsdk/.
POST /api/v1/buyFullSet: trader-facing endpoint backing the chainPrivateNote.splitFullSet. Permitted onAWAITING_FREEZE(first successful call activates the OrderBook) andTRADING. NewBuyFullSetUseCase,chain.split_full_set_timeout_msconfig, anddocs/tech-specs/write-api.mdsection.crates/chainpromotesDex::split_full_setout oftest-helpersinto the prod path.
openapi/openapi.yamlandopenapi/index.html: published OpenAPI spec rendered on GitHub Pages. Addedservices/api/src/bin/gen-openapi.rsgenerator binary,openapi/generate.sh, and.github/workflows/{openapi,pages}.ymlto regenerate and deploy on push.crates/chain/: new chain-client crate carved out ofinfrastructure/chain_sender.rs(client, DTO, error, test helpers).makerComissionandtakerComissionfields on theGET /api/v1/marketsresponse. SignedDECIMALstrings (e.g."0.00045"); a negativemakerComissionis a maker rebate credited rather than debited.
- Regenerated OpenAPI after BE-DEX method sync; moved
openapi/index.html→docs/index.htmlfor Pages serving.
GET /api/v1/accountbalances API (#27): collateral + outcome-token balances, plus-2013error for accounts with no deployed PrivateNote contract. Addspn_state_reader,tvm_hashhelpers, and thePrivateNote.solsource.DELETE /api/v1/batchOrderscancel-batch endpoint (#26): atomic batch cancellation byorderIds, capped at 5 per request. Addstests/cancel_batch_orders_http.rsandtests/resolve_for_cancel.rscoverage.
docs/api-spec.md: documentedGET /api/v1/accountoutcome balances andDELETE /api/v1/batchOrdersresponse shape; aligned cancel errors with new-2013.AGENT_REQUIREMENTS.md: strengthened the pre-commit spec-sweep rule (re-read every doc underdocs/and touched READMEs — no narrowing of "relevant").
POST /api/v1/batchOrders(#25): atomic batch order creation, per-outcomemaxBatchSize, intra-batch dedup ofnewOrderClientId. New tests:create_batch_orders_http.rs,e2e_batch_orders.rs.GET /api/v1/ordersall-orders endpoint (#23): paginates orders across all markets for the authenticated account, sorted by stable chain-order key (descending). Addedtests/orders.rs(replaces the older open-orders coverage) anddocs/migrations/orders-cancel-remainder-cutover.md.
- Renamed
openOrdersfilter behavior and trimmed staleMARKETTIF claims indocs/api-spec.md. docs/tech-specs/{read-api,data-schema,indexer}.md: updated to match the all-orders projection and new cursor semantics.
DELETE /api/v1/ordercancel-order endpoint (#24): single-order cancel withPENDING_CANCELintermediate status; ephemeral-market testkit underservices/api/tests/common/(deploy_market.rs,e2e_setup.rs,test_pns.rs) and newe2e_cancel_order.rs.
docs/api-spec.mdanddocs/tech-specs/write-api.md: documented cancel acceptance/finality semantics.
contracts/: regeneratedOracleEventList.sol,OrderBook.sol,PMP.sol,PrivateNote.sol,RootPN.sol,modifiers/{errors,modifiers}.solfrom the latest DEX source (#22).
POST /api/v1/ordercreate-order endpoint (#21) withPENDING_NEWacceptance semantics, fail-closedAppStatehoop, and quantity-validation tightening. Addedtests/resolve_for_new_order.rs.
docs/api-spec.mdanddocs/tech-specs/write-api.md: documented order placement,MARKETbuy semantics onquoteAsset, andrequest_timeout > chain timeoutinvariant.- Renamed write-side spec file; restored
api-spec.mdafter rebase churn.
- Open-orders pipeline behind
GET /api/v1/openOrders(#20): projectors, postgres repo extensions, andtests/open_orders.rs(later subsumed by the all-orders endpoint). migrations/0001_initial.sqlreplacing0001_init_read_model.sql— initial read-model schema reset.
docs/tech-specs/{data-schema,indexer,read-api}.md: documented open-orders projection and schema.
POST /api/v1/ordermocked implementation with auth/permission wiring (#15) anddocs/tech-specs/auth.mdend-to-end smoke coverage.GET /api/v1/depthorder-book endpoint (#11) — initial DEX read API skeleton, ABI bundle undercontracts/dex/, rootCargo.tomlworkspace,config/{api,indexer}.local.yaml, andLICENSE.md.docs/README.md— documentation map with file ownership.CHANGELOG.md(this file).
- Restructured
docs/tech-specs/(#18):market-data-api.md→read-api.md(scope: all read endpoints).market-data-indexer.md→indexer.md.trading-api/write-api.md→write-api.md(top-level).
- Updated cross-references in
services/api/README.md,services/indexer/README.md,AGENT_REQUIREMENTS.md, and inline test comments. - Rewrote root
README.mdfor DEX.DO (previous content was carried over from a different project). - Centralized permission check and split authN/authZ in
docs/tech-specs/auth.mdto match code (#16, #17).
docs/tech-specs/trading-api/directory (emptyread-api.mdremoved;write-api.mdpromoted to top-level).internal-docs/directory (was gitignored; local-only).AGENTS.mdlegacy stub.
docs/api-spec.md: extended response payloads with UI-facing fields; addeddocs/tech-spec.md; removeddocs/technical-spec-market-data.md(#10).
docs/api-spec.mdrewritten and aligned withdocs/dex-events-routing.md(#8); added rendered HTML diagramsdex-contracts-external-flows.htmlanddex-contracts-system.html.
contracts/: synced to the latest DEX contracts (#7) —Nullifier.sol,Oracle.sol,OracleEventList.sol,OrderBook.sol,PMP.sol,PrivateNote.sol,RootOracle.sol,RootPN.sol,libraries/DexLib.sol,modifiers/{errors,modifiers,replayprotection}.sol.
docs/GRAPHQL.md— GraphQL gateway notes (#4).docs/dex-events-routing.md— event-routing reference.
- Updated
docs/dex-contracts-object-diagram.drawio.
- Initial Solidity contracts under
contracts/(#2):Nullifier,Oracle,OracleEventList,OrderBook,PMP,PrivateNote,RootOracle,RootPN, pluslibraries/DexLib.soland sharedmodifiers/.
- Reworked
docs/api-spec.mdto match contract shapes.
docs/api-spec.md— first draft of the REST API specification.
- Initial commit.