Smart Contract Architecture

Axiom is composed of several smart contracts, each with a clear and isolated role. This modular design makes the system more secure, more upgradeable, and easier to reason about.


Vaults (XRPVault and future stablecoin vaults)

Responsible for:

  • Accepting deposits

  • Minting non-transferable share tokens (aXRP)

  • Burning shares on withdrawal

  • Increasing share price as yield accrues

  • Enforcing resolution locks

The vaults follow a modified ERC-4626 pattern for predictable, fair accounting.


Eligibility Registry

Responsible for:

  • Snapshotting staker USD values

  • Sorting stakers by percentile

  • Defining the top 50 percent

  • Providing Merkle proofs for eligibility

  • Supporting fraud proofs during decentralized operation

The system uses an optimistic off-chain Merkle snapshot model with on-chain verification if challenged.


MarketFactory

Responsible for:

  • Creating new markets

  • Verifying top 50 percent eligibility (post-bootstrap)

  • Deploying the TieredParimutuelMarket contract

  • Managing upgrade paths for future mechanism types

The MarketFactory is upgradeable, allowing governance to introduce new trading mechanisms later without disrupting existing markets.


TieredParimutuelMarket

Responsible for:

  • Accepting bets

  • Applying time bonuses

  • Tracking weighted shares

  • Displaying implied odds

  • Enforcing no early exits

  • Closing markets at event end

  • Tracking real prize pool vs virtual seed

This is the core trading experience for users at launch.


MarketResolver

Responsible for:

  • Accepting proposals

  • Starting challenge windows

  • Handling voting and escalation

  • Applying penalties and rewards

  • Finalizing outcomes

  • Triggering payout availability

Resolution is designed for both speed and accuracy, with optimistic resolution for uncontroversial markets and escalation for contested ones.


FeeRouter

Responsible for:

  • Routing commissions to vaults and the dev treasury

  • Distributing market creator quality bonuses

  • Paying proposer consensus bonuses

  • Splitting yield across vaults based on 7 day TVL averages

The FeeRouter ensures that Axiom Prime earns yield directly from Axiom Markets.

Last updated