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
Public APISmart ContractsSecurity ModelOpen SourceRust Node CoreGetting Started (Developer)Benchmarks
Docs/Developer/Smart Contracts
Developer

Smart Contracts

EVM and Solana contract reference. DecenterlizeMarketV1, LocalTokenSwapRouter, AppOwnedUniswapV3SwapAdapter, staking programs, and deployment details.

#Smart Contracts

On-chain smart contracts handle settlement and staking. All contracts are open source and immutable after deployment. No proxy patterns, no admin keys, no upgrade paths.

#EVM Contracts

#DecenterlizeMarketV1.sol

The core marketplace contract for EVM chains. Handles order execution with EIP-712 typed signature verification:

solidity
contract DecenterlizeMarketV1 {
    bytes32 public DOMAIN_SEPARATOR;
    uint256 public constant MARKETPLACE_FEE_BPS = 200; // 2%

    // Execute a seller-signed order
    function executeOrder(
        Order calldata order,
        bytes calldata sellerSignature,
        address feeRecipient
    ) external payable nonReentrant;

    // Cancel a specific order
    function cancelOrder(Order calldata order) external;

    // Cancel all orders (increments nonce)
    function cancelAllOrders() external;
}

Features:

  • EIP-712 typed signatures. Human-readable signing prompts in wallets.
  • ERC-721 support. Single NFT transfers (1 token per ID).
  • ERC-1155 support. Semi-fungible tokens (multiple tokens per ID).
  • Non-reentrant. Lock variable protects all state-changing functions.
  • Immutable fees. 200 bps hardcoded, 50% foundation / 50% reward pool.
  • Order cancellation. Individual cancel or bulk cancel via nonce increment.

#LocalTokenSwapRouter.sol

Constant-product AMM for marketplace-native token markets:

solidity
function swap(
    address tokenIn,
    address tokenOut,
    uint256 amountIn,
    uint256 minAmountOut
) external returns (uint256 amountOut);

function addLiquidity(
    address tokenA,
    address tokenB,
    uint256 amountA,
    uint256 amountB
) external returns (uint256 lpTokens);

function removeLiquidity(
    address tokenA,
    address tokenB,
    uint256 lpTokens
) external returns (uint256 amountA, uint256 amountB);
  • Constant-product (x * y = k) pricing model.
  • 0.3% swap fee accruing to liquidity providers.
  • 200 bps marketplace fee split 50/50 between foundation and the reward pool.
  • LP tokens for tracking liquidity provider shares.
  • Governance-configurable parameters for fee rates and pool permissions.

#AppOwnedUniswapV3SwapAdapter.sol

External DEX integration wrapping Uniswap V3:

  • Wraps the Uniswap V3 SwapRouter for access to deep external liquidity.
  • Applies the marketplace fee layer on top of external swaps.
  • Supports multi-hop routes (e.g., TOKEN → WETH → USDC).
  • Slippage protection via minAmountOut.
  • Path encoding for optimal route selection.

#Solana Programs

#agorix_marketplace

Anchor program for SPL marketplace operations:

rust
#[program]
mod agorix_marketplace {
    pub fn record_sale(ctx: Context<RecordSale>, sale_id: [u8; 32], price_lamports: u64, seller: Pubkey, buyer: Pubkey) -> Result<()>;
    pub fn cancel_listing(ctx: Context<CancelListing>, sale_id: [u8; 32]) -> Result<()>;
}

Handles SPL token transfers, fee distribution, and sale record creation.

#agorix_staking

Anchor program for node operator staking:

  • USDC/USDT collateral vaults. Operators deposit stablecoins as bond.
  • Governance-configurable cooldown. Currently 7 days standard, escalating for delegates.
  • Lifecycle tracking. Active → Exiting → Exited state machine.
  • Slashing support. Provable misbehavior (double-signing, false attestation) triggers bond reduction.
  • Delegation integration. Tracks delegated voting power per operator.

#Deployment

ContractNetworks
DecenterlizeMarketV1Ethereum, Base, Arbitrum, Optimism
LocalTokenSwapRouterEthereum, Base, Arbitrum, Optimism
AppOwnedUniswapV3SwapAdapterEthereum, Base (where Uniswap V3 is deployed)
agorix_marketplaceSolana
agorix_stakingSolana

Each EVM deployment uses the same bytecode. Chain-specific parameters (chain ID in the EIP-712 domain separator) are set at construction time.

#Verification

  • Source published. Full contract source available in the repository under contracts/ (Solidity) and programs/ (Anchor).
  • Bytecode matching. Deployed bytecode can be verified against compiled source.
  • No proxy. What you see is what runs. No delegatecall, no upgradability.
  • Hardhat/Foundry. EVM contracts tested with both frameworks.
  • Anchor test suite. Solana programs tested with Anchor's built-in test runner.

#Security Properties

  • Immutable. No proxy patterns, no upgrade paths, no admin keys.
  • Non-reentrant. All state-changing functions protected.
  • Minimal surface. Each contract does one thing well.
  • Deterministic fees. No governance override on fee percentages.
  • Open source. Every line of deployed code is auditable.
PreviousPublic APINext Security Model

On this page

  • Smart Contracts
  • EVM Contracts
  • DecenterlizeMarketV1.sol
  • LocalTokenSwapRouter.sol
  • AppOwnedUniswapV3SwapAdapter.sol
  • Solana Programs
  • agorixmarketplace
  • agorixstaking
  • Deployment
  • Verification
  • Security Properties