Omni Balance Architecture
Omni balance is the shared ledger that powers every HEX workflow. It tracks collateral bridged through HOT Omni Bridge or lite-client bridges, stores the state on NEAR, and exposes balances to the UI and APIs.
Ledger Model
Account
A wallet public key with signing rights over Omni intents.
Asset
Native token identified by {chain_id}:{token_address}.
Balance
Tuple (available, reserved) to separate free collateral from intent collateral.
Delta
Atomic change applied after deposits, swaps (token_diff), or withdrawals (mt_withdraw).
Balances live in NEAR storage, so updates are deterministic and auditable. Each action emits an event that off-chain services (analytics, accounting) can subscribe to.
Lifecycle
Deposit – A HOT Omni Bridge locker (or lite-client bridge for BTC/Zcash) locks the native token and submits a proof. The ledger credits
available.Reserve – When a user signs a
token_diffintent, the Omni Balance contract tags the required balance asreserveduntil execution.Settlement – A solver or relayer executes the intent, debiting
reservedand crediting the purchased asset’savailable.Withdrawal – The user signs an
mt_withdrawintent; the ledger burnsavailableunits and instructs the HOT unlocker to return the native token.
Deposit lock
HOT Omni Bridge locker
Chain-specific contracts on Ethereum, Solana, TON, Stellar, etc.
Proof validation
Omni Balance contract (NEAR)
On-chain “database” that stores balances and validates signatures.
Settlement
Omni intent executor
Solvers/relayers submit signed token_diff payloads.
Withdrawal unlock
HOT unlocker
Releases native tokens after mt_withdraw.
At no point does HEX mint synthetic assets. Every unit maps 1:1 to locked collateral.
Risk Controls
Instant unlocks: Canceling an intent immediately releases
reservedfunds.Global caps: HOT Bridge enforces per-asset ceilings that propagate to the omni ledger.
Audit trails: Each delta carries a unique ID so external auditors can replay the full history.
Integration Notes
Use the Omni Balance view calls (e.g.,
get_balance,list_deltas) to display balances in custom dashboards.When building automations, treat the ledger as eventual-consistent with a sub-second lag; poll emitted events rather than relying on UI states.
Last updated