agorix
AirdropMarketsCollectionsLeaderboardActivity
Agorix · Decentralized Marketplace
Independent · Resilient · Community-Run

A cross-chain marketplace, run by the community.

Discover, list, and trade across Bitcoin, Ethereum, and Solana on an open, community-run network.

Marketplace
CollectionsMarketsLeaderboardActivity
Network
GovernanceExplorerAirdropDocs
Account
ProfileSettings
Legal
Terms of ServicePrivacy PolicyYour Privacy Choices
agorix.io — Lasting Access
CID: 0xA60R1X · v0.1
AirdropMarketsCollections
D
Protocol Docs
OverviewHow It WorksRunning a NodeArchitecture
Docs/Getting Started/How It Works
Getting Started

How It Works

The 4-step transaction lifecycle: List, Validate, Attest, Settle. How every trade flows through the protocol regardless of chain, including witness selection, Proof-of-Access challenges, and the reward pool.

#How It Works

Every trade follows a deterministic 4-step lifecycle. This is identical whether you are trading Bitcoin ordinals, Ethereum NFTs, or Solana tokens. Same engine, every chain.

#Step 1: List

Sellers create chain-native listing signatures. The protocol emits a LISTING_CREATE event that gets gossiped to every node in the network.

Bitcoin (Ordinals / PSBTs):

The seller signs a PSBT with SIGHASH_SINGLE|ANYONECANPAY. This signature commits the seller's ordinal input to a specific output amount but allows the buyer to add their own inputs and outputs later. The signed PSBT is then:

  • Encrypted using AES-GCM with a random session key
  • Split into Shamir 3-of-4 secret shares
  • Distributed to 4 independent shard-holder nodes
  • Each shard is stored encrypted at rest on its holder node

This means no single node ever has enough information to reconstruct the PSBT. At least 3 of the 4 shard holders must cooperate during settlement. This is critical for preventing theft -- even a compromised node cannot steal the seller's signature.

Ethereum / Base / Arbitrum / Optimism (EIP-712):

The seller signs an EIP-712 typed data order containing:

  • Asset contract address and token ID
  • Sale price and currency
  • Unique nonce and salt (replay protection)
  • Expiration timestamp
  • Fee breakdown (foundation, UI provider, witnesses)

The order is verifiable on-chain by AgorixV1.sol without any off-chain coordinator.

Solana (SPL):

The seller creates an SPL token transfer authorization via the agorix_marketplace program. The authorization is scoped to the specific asset and price, with built-in expiration.

#Step 2: Validate

Every node independently runs validateSaleTx() against the transaction. This is pure computation -- same inputs always produce the same outputs. No coordinator is needed.

The validation checks, in order:

text
validateSaleTx():
  1. Protocol version matches node's accepted versions
  2. Validator version matches (prevents stale logic)
  3. Quote signature is valid Ed25519 over the quoted price
  4. Quote has not expired (timestamps are checked)
  5. Release hash matches the consensus-approved code release
  6. Listing status is ACTIVE (not cancelled, expired, or already sold)
  7. Listing has not passed its expiration timestamp
  8. Asset outpoint appears in the transaction inputs (BTC)
     or asset contract+tokenId matches (EVM)
     or SPL token account matches (SOL)
  9. Witness selection is verified against the deterministic algorithm
  10. Paid witness count matches the protocol-required count
  11. Fee distribution is correct:
      - Foundation fee (1%)
      - UI provider fee (configurable)
      - Witness fees (split among selected witnesses)
      - Royalty fees (if applicable, per creator settings)
  12. Seller payout equals sale price minus all fees
  13. All outputs match expected addresses and amounts

Protocol Truth is computed locally by each node. Because the validation is deterministic, honest nodes always agree. If a node produces a different result, it is provably wrong and can be slashed.

#Step 3: Attest

A quorum of witnesses independently verifies the transaction on-chain and signs attestations.

Witness Selection:

Witnesses are selected deterministically using a seeded ranking algorithm:

text
For each eligible node:
  score = SHA256(sessionCommitHash + nextBlockHash + nodePubkey)
  rank nodes by score ascending
  top K nodes become witnesses

The sessionCommitHash is committed before the block is known, and nextBlockHash is unpredictable until the block is mined. This makes witness selection unbiasable -- nobody can know who will be selected until the block is finalized.

Proof-of-Access (PoA) Challenges:

Before a witness can attest, it must prove real-time access to the relevant blockchain's RPC infrastructure. The challenge system verifies that the witness can actually read chain state, not just claim it can.

ChainRequired ChallengesWhat is Verified
Bitcoin (Ordinals)5BTC chain state (3 challenges) + ordinal indexer state (2 challenges)
Ethereum / EVM3Block headers, transaction receipts, contract state
Solana3Slot data, account state, transaction confirmations

Challenges query historical state at specific block heights to prevent caching tricks. Each challenge has a tight time window -- if the witness cannot respond quickly enough, the challenge fails.

Attestation Threshold:

Witnesses sign their verdict (approve or reject) using Ed25519. Settlement requires a supermajority of 2/3 (ceiling) of witnesses to agree. For example, with 6 witnesses you need at least 4 approvals. This is the standard Byzantine Fault Tolerance threshold -- the system tolerates up to 1/3 malicious or offline witnesses.

#Step 4: Settle

Once the attestation threshold is met, native chain settlement proceeds:

Bitcoin: The 3-of-4 Shamir shards are requested from shard-holder nodes. At least 3 shards must be recovered to reconstruct the seller's signed PSBT. The buyer's inputs and outputs are added, and the final transaction is broadcast to the Bitcoin network. A critical race condition guard ensures that shard distribution is atomic -- if any shard holder fails to deliver, the entire reconstruction is rolled back to prevent partial reveals that could leak the seller's signature.

Ethereum / EVM: The AgorixV1.sol smart contract verifies the EIP-712 signatures, checks the attestation quorum, and executes the atomic swap of asset for payment. Fee splits happen on-chain in a single transaction.

Solana: The agorix_marketplace program executes the SPL token transfer with on-chain fee distribution. The authorization is consumed atomically.

Fee Distribution:

RecipientShareNotes
Foundation1% (50% of 2% fee)Funds protocol development and operations
Reward pool1% (50% of 2% fee)Paid to the chain's reward pool wallet and shared out to nodes each epoch by work weight
WitnessesPaid from the reward poolAttesting a sale earns work weight for the epoch

#Reward Pool and Epochs

A sale has no winning node. The network share of the fee is paid to the chain's reward pool wallet (governance key rewardPool.recipients). If no pool wallet is configured for a chain, the sale is refused.

Nodes earn weight for the work they do: serving the site and media, AI requests, chain reads, storage and shard custody, MPC signing, and sales. A sale's weight follows the fee it produced and is split between the serving, media, witness and custody nodes named in the purchase.

At the end of each epoch the pool is settled from the recorded work:

  • Most of the pool is paid pro rata by weight.
  • The rest is drawn as a lottery in which every point of weight is a ticket.

The epoch length and the lottery share are set by governance. The lottery seed uses a beacon that is only known after the epoch closes, so nobody can choose it, and any node can recompute the settlement from the same receipts. Rewards are then paid through signed claims. The Protocol page "Reward Pool and Epochs" has the details.

#Complete Event Lifecycle

Every step generates signed protocol events gossiped to all nodes:

text
LISTING_CREATE         Seller publishes the listing
       |
       v
ORDER_INTENT           Buyer signals intent to purchase
       |
       v
TX_OBSERVED            Transaction detected on-chain (or constructed)
       |
       v
TX_ATTESTATION         Each witness signs their verdict
  (per witness)
       |
       v
TX_FINALIZED           Supermajority reached, settlement confirmed

These events form a complete, auditable, cryptographically signed history that is visible in the protocol explorer. Every node stores every event. Nothing is hidden.

PreviousOverviewNext Running a Node

On this page

  • How It Works
  • Step 1: List
  • Step 2: Validate
  • Step 3: Attest
  • Step 4: Settle
  • Reward Pool and Epochs
  • Complete Event Lifecycle