#Solana
The Solana marketplace handles SPL token and NFT trading through Anchor programs, with a separate staking program for node operator collateral.
#Current Status
Honest assessment: the Solana settlement program is not yet fully wired into the live protocol. The marketplace program exists, the staking program works, and PoA challenges run, but end-to-end purchase settlement through the on-chain program still has gaps. SPL token transfers and listing creation work. The final mile (atomic on-chain settlement with fee splitting and witness attestation) is in progress.
What works today:
- SPL token and NFT listing creation
- PoA challenges against Solana RPC
- Staking program for node operator bonds
- Transaction simulation and validation
- Witness attestation for manually settled trades
What's in progress:
- Fully automated on-chain settlement via the marketplace program
- Cross-program invocation for atomic fee splitting
- Integration with the TX-plan quorum flow
#Marketplace Program
The agorix_marketplace Anchor program records token sales:
#[program]
mod agorix_marketplace {
pub fn record_sale(
ctx: Context<RecordSale>,
sale_id: [u8; 32],
price_lamports: u64,
seller: Pubkey,
buyer: Pubkey,
) -> Result<()> {
// Record the sale event on-chain
// Transfer SPL token from seller to buyer
// Distribute fees to foundation + reward pool
}
pub fn cancel_listing(
ctx: Context<CancelListing>,
sale_id: [u8; 32],
) -> Result<()> {
// Verify seller authority
// Mark listing as cancelled
}
}
#Staking Program
The agorix_staking Anchor program manages node operator bonds:
- Collateral vault management for USDC/USDT deposits.
- Cooldown period enforcement that's governance-configurable (currently 7 days for standard unstake, escalating for delegates).
- Status tracking through the Active → Exiting → Exited lifecycle.
- Slashing support for provable misbehavior (double-signing, false attestation).
- Delegation tracking for governance vote delegation.
#SPL Token Support
The marketplace supports all SPL token standards:
- Metaplex standard NFTs. Traditional Solana NFTs with metadata accounts.
- Merkle tree compressed NFTs (cNFTs). State-compressed NFTs for large collections.
- Token-2022 fungibles. New token standard with transfer hooks and confidential transfers.
- Legacy SPL fungibles. Original SPL token program.
#Proof-of-Access for Solana
Solana nodes get 3 PoA challenges verifying RPC access:
- Recent block hash. Query the blockhash at a random recent slot (within the last 150 slots). Verifies the node has a synced Solana RPC.
- Account balance lookup. Check the SOL balance and token accounts for a known address. Verifies account state access.
- Transaction history. Fetch transaction signatures for a specific account within a slot range. Verifies historical data access.
Challenges use slot numbers rather than block heights (Solana's slot-based consensus), and the queried slots are randomized to prevent caching.
#Transaction Flow
- Seller creates an SPL transfer authorization and signs the listing.
- Listing broadcasts as a signed protocol event to all nodes.
- Buyer submits purchase intent.
- Transaction is simulated against the current Solana state.
- Marketplace program executes the transfer (when fully wired).
- Witness nodes verify the on-chain transaction via their own RPC connections.
- Attestation quorum finalizes the sale.
#Integration
The Solana runtime plugs into the broader protocol identically to other chains:
- Same validation engine (
validateSaleTx()). - Same witness selection algorithm (HMAC-SHA256 deterministic seeding).
- Same fee structure (2%, 50/50 split between foundation and the reward pool).
- Same event system (
SOL_PURCHASE_SUBMITTED → TX_OBSERVED → TX_ATTESTATION → TX_FINALIZED). - Same rate limiting and node authentication.