OwarineDocs
Open app
How it works

The Daml packages

The Daml packages behind Owarine, who signs each contract, and what the ledger enforces.

Reviewed 2026-10-06

Owarine has six Daml packages (Daml SDK 3.5): five released as R1 and the seat package added as R2. The pm-tests Daml Script suite covers the contracts; dated test results and live execution are different kinds of evidence. Every contract names the parties that sign it and the parties that may see it; the ledger enforces both. The release files, with package ids and hashes, are in daml/released/. Recorded checks are dated evidence; this docs review did not rerun Daml tests or upgrade checks.

PackageVersionWhat it holds
abu-pm-main0.5.2Windows, prints, quotes, positions, cash, resolution, events, grants, reserves, the maker vault and pre-open resting calls. The others depend on it.
abu-pm-tickets0.1.4Range and Moonshot, Parlay, Boost (a short is Boost on Down) and Earn.
abu-pm-agents0.2.2Strategies, subscriptions, creator fees, grant top-ups and the desk mandate.
abu-pm-games0.1.2Duels, their results and the season prize pool.
abu-pm-cc0.1.1The Canton Coin rail on the CIP-56 token standard: a deposit credits the coin received at the venue's listing rate, a withdrawal is a token-standard transfer back, and an auditor sees the coin held against the coin owed. A faucet/deposit/withdrawal/reserve round trip is recorded on Noders DevNet on 7 October 2026. This uses test coin, not MainNet money.
abu-pm-seat0.1.0Standing exits and send/accept demo-credit transfers. Local drive evidence exists; the R2 DevNet user journey was not re-verified in the documentation pass.

The core contracts

ContractSigned by · seen byWhat it holds
Seriesvenue · resolver, auditorA lane's cadence, oracle list, quorum of 2, 1% deviation limit and append-only price-policy versions.
MarketTermsvenue · resolverOne Window's fixed terms: start, lock, expiry, deadlines, refund time.
PriceQuotean oracle · venue, resolverOne oracle's price for a symbol at a boundary, with the sha-256 of the raw source payload.
OpenPrint → Resolutionresolver and venueThe single-use resolution chain: each step consumes the one before, so a Window resolves or voids exactly once.
Quote, BuyQuotevenue · the quoted seatThe venue's firm offer to sell you a side, or buy one back, at one price until a set time.
Legvenue and ownerA position. Accepting a quote creates a pair: your leg and the venue's opposite one. A private call's leg pays back into your private balance, win, loss or void.
VenueAccount, VenueCashvenue and ownerA seat's account and its demo credits.
RestingDesk → RestingOffer → RestingCallvenue, then venue and ownerA pre-open call: the venue's offer to hold it (before the bell only), then your stake held inside a call only you and the venue see.
Publication, SettlementReceiptvenue and ownerAn opt-in public record of a call, and the receipt a finished position leaves (it names the private balance when a private call paid back into it).
EventTerms → EventVerdictvenue, then resolver and venueA committee event and its one verdict.

How a call works

The opening print must exist before the issuer offers a normal quote. Each PriceQuote is signed by its oracle; OpenPrint and Resolution require the resolver and venue signatures.

A trade from opening print to receipt

Loading diagram…

Read diagram source

sequenceDiagram
participant Seat
participant Web as Web seat routes
participant Ops as Venue issuer / settler
participant Oracles as Three oracle parties
participant Ledger as Daml on DevNet
participant Resolver
Oracles->>Ledger: Opening PriceQuotes
Resolver->>Ledger: Terms_RecordOpen
Seat->>Web: Ask for a firm quote
Web->>Ops: /internal/quotes
Ops->>Ledger: Desk_IssueQuote
Ledger-->>Ops: Quote created for this seat
Ops-->>Web: Firm quote
Web-->>Seat: Review quote
Seat->>Web: Accept quote
Web->>Ledger: Quote_Accept as leased party
Ledger-->>Web: Owner Leg and venue opposite Leg
Oracles->>Ledger: Closing PriceQuotes
alt Admitted quorum agrees
  Resolver->>Ledger: Terms_Resolve
else Missing, late or disagreeing prints
  Resolver->>Ledger: Terms_Void or disagreement result
end
Ops->>Ledger: Desk_SettleBatch
Ledger-->>Web: Cash and SettlementReceipt
Web-->>Seat: Portfolio result and proof link

Series_OpenWindow creates the terms and single-use WindowState. Terms_RecordOpen consumes that state; resolution consumes OpenPrint. These markers prevent two outcomes for one Window. A disagreement during the opening check can void it before a normal quote exists.

Quote_Accept checks price, expiry and cash. A win pays the leg's full quantity; a void returns stake plus fee. If the venue does not settle, the owner can use Leg_Claim against the resolution. From refundAfter, Leg_RefundStale returns stake and fee without an ops actor.

A call rested before the bell is different: the venue makes an offer (RestDesk_Offer), you place it with your own cash (RestOffer_Place), and after the bell the venue fills it at exactly your price (Rest_Fill), in whole or in part, with the same two Legs. You can cancel it any time (Rest_Cancel), and the venue returns an unfilled one at its expiry (Rest_Expire).

Selling early is a BuyQuote you accept (BuyQuote_Accept). Draining a released seat closes its legs at cost with Leg_CloseOut, which needs both the venue and the seat.

What the tests cover

pm-tests checks, among others: money is conserved after every step of seeded random sequences; the venue cannot resolve a Window, confiscate a position or accept a quote for you; the resolver cannot resolve without the oracle quorum; a Window resolves or voids exactly once, and settle and stale refund never both run; an outsider sees nothing; tickets, grants, the desk, duels and the maker vault each keep their conservation rules. No external audit is claimed.

On this page