Transaction types, profit types and statuses
The ledger vocabulary Instant Convert writes - the CONVERT transaction type and the eleven wallet operations behind it, the CONVERT and CONVERT_HEDGE profit types and what each row means, the idempotency keys, the tables, and every status a quote, order, Send, hedge and movement can carry.
The transaction type
Almost every wallet movement Instant Convert makes is a transaction row of type
CONVERT, a member appended to the transaction type column (and to
transaction_archive) by the core release. The exceptions: the Super Admin's fee
credit, and a sweep's profit credit, are PLATFORM_FEE rows written by the
platform fee collector; a loss refill is an ordinary transfer,
OUTGOING_TRANSFER from the Super Admin and INCOMING_TRANSFER to the
house; and the withdrawal of a convert and withdraw is the Ecosystem addon's own
withdrawal. A user's history therefore reads Convert, not Payment. The wallet
operation behind each CONVERT row is kept in its metadata as operationType,
together with the order id, the leg, the rate and the quote id:
| Operation | Whose wallet | Written when |
|---|---|---|
CONVERT_OUT |
user | the user gives the currency, less the fee |
CONVERT_FEE |
user | the user pays the fee (it lands on the Super Admin) |
CONVERT_IN |
user | the user receives the currency |
CONVERT_HOUSE_IN |
house | the house receives what the user gave (for a Send, and held); a Send's network fee margin at confirmation |
CONVERT_HOUSE_OUT |
house | the house pays the user, or gives up the gross of a Send; a Send's gas shortfall at confirmation |
CONVERT_REVERSAL |
user, house | a Send is reversed |
CONVERT_FUNDING |
Super Admin, house | Fund |
CONVERT_DEFUNDING |
house, Super Admin | Defund, from the console or the house page |
CONVERT_HEDGE_FILL |
house | a hedge's hold, spend, release, proceeds and third-currency fee |
CONVERT_REBALANCE |
house | a house movement's hold, spend, fees, release, restore and credits |
CONVERT_PNL_SWEEP |
house | the daily sweep's debit of the house's USDT when a profit is swept (a loss refill is an ordinary Super Admin → house transfer) |
Each row's referenceId is <orderId>:<leg> (the column is unique, so one value
per row), and the Super Admin's fee credit is <orderId>_fee.
The mobile app has no Convert screen in this release. It maps an unknown transaction type to Other, so a convert shows in its history without breaking it.
The profit types
Two members are appended to admin_profit.type:
| Type | Sign | Written for |
|---|---|---|
CONVERT |
positive | every landed Convert fee, credited to the Super Admin in the same transaction as the convert; every swept profit |
CONVERT_HEDGE |
negative, record-only | gas and gas top-ups the Ecosystem master wallet paid for the house (a Send, a failed Send, a house movement) |
CONVERT_HEDGE |
negative | a loss recognised by the sweep, refilled by one visible Super Admin → house transfer |
Record-only means the row records platform money that left the master wallet; it is not a debit of the Super Admin. The one Super Admin debit in this vocabulary is the loss refill, which is its own visible transfer to the house.
Costs the house's own wallets paid (a hedge fee in a third currency, gas the
house's key burned beyond the network fee charged, venue fees and shortfalls on
house movements, a write-off), and a fee the house refunds when a Send is
reversed, are not admin_profit rows: they are already inside the house's
inventory and the sweep's net, and a row would count them twice. They appear in
the Profit & loss as house costs.
So, per currency, CONVERT + CONVERT_HEDGE = Convert fees + what was swept to
the Super Admin (a refill counting negative) − the master's costs. Both types
appear in the platform's profit report and in the admin dashboard's revenue
streams.
Idempotency keys
Keys are global on the platform, so every Convert key carries its own prefix.
| Key | For |
|---|---|
convert:<quoteId>:<leg> |
a convert's ledger legs (out, house_in, house_hold, house_out, in) |
convert_fee:<quoteId> |
the user's fee debit |
convert_send:<sendId>:<leg> |
a Send's confirmation legs (release, fee_margin, fee_shortfall) |
convert_reverse:<orderId>:<leg> |
a Send's reversal legs |
convert_hedge:<hedgeId>:<leg> |
a hedge's booking legs |
convert_rebalance:<movementId>:<leg> |
a house movement's legs |
convert_fund:<requestId>:<leg> |
funding and defunding from the Convert console, and defunding from the house page |
convert_pnl:<day>:USDT:<leg> |
the daily sweep (house_out, profit, loss, refill) |
The real guard against a double convert is the quote row lock plus its USED
status; the keys are the second line.
Tables
All ship with the core, so the house page can read them while the addon is off.
| Table | Holds |
|---|---|
convert_asset |
one row per (currency, wallet type): directions, limits, spread override, floor, target, hedge switch |
convert_chain_inventory |
one row per (currency, chain) for Sends: enabled, floor, target |
convert_quote |
every quote, written before the user sees it, with its price inputs |
convert_order |
every executed convert |
convert_send |
every Convert & Send payout, with its reservation, hold and finality evidence |
convert_hedge_order |
every hedge order |
convert_hedge_lock |
one row per currency a hedge is in flight for |
convert_currency_state |
per currency: frozen, paused until, failures in a row, quoting closed |
convert_rebalance |
every house movement |
convert_lot |
the house's cost lots |
convert_pnl_day |
realised profit, fees and costs per UTC day and currency; three kinds of non-currency row: #cursor (the processing cursor), * per swept day (that day's sweep record) and @<coin> (the costs the master wallet paid in that coin that day, reported and never swept) |
Statuses
| Record | Statuses |
|---|---|
| Quote | OPEN, USED, EXPIRED |
| Order | COMPLETED; for a Send PENDING_SEND → SENT → COMPLETED, or REVERSED (a failed Send's order keeps its status until the reversal lands). FAILED exists in the schema but is not written in this release. |
| Send | AWAITING_APPROVAL, PLANNED, SENDING, SENT, CONFIRMED, FAILED, NEEDS_REVIEW, REVERSED |
| Send reservation | OPEN, SPENT (confirmed), RELEASED (reversed) |
| Hedge order | PLANNED, DISPATCHED, FILLED, PARTIAL, FAILED, NEEDS_REVIEW |
| House movement | PLANNED, SUBMITTED, IN_TRANSIT, COMPLETED, FAILED, NEEDS_REVIEW |
| Movement direction | TO_CHAIN (exchange to chain), TO_EXCHANGE (chain to exchange) |
| Cost lot source | CONVERT, HEDGE, FUNDING, REBALANCE |
What the pool-backing reconciliation sees
Nothing new. A convert is double-entry against the house, so for every currency the total over all wallets is unchanged and no obligation row is written. The reconciliation's attribution knows every Convert operation and files none of them as unexplained; it counts the house inside what the platform owes and shows it on its own line.