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
Bitcoin & OrdinalsEthereum & L2sSolanaSettlement Flows
Docs/Multi-Chain/Ethereum & L2s
Multi-Chain

Ethereum & L2s

EVM marketplace with EIP-712 signed orders, smart contract settlement, constant-product AMM, and Layer 2 support across Base, Arbitrum, and Optimism.

#Ethereum & Layer 2s

The EVM marketplace supports Ethereum L1 and all major Layer 2 networks through a suite of smart contracts with EIP-712 typed signature verification, a constant-product AMM, and external DEX integration.

#Smart Contract: DecenterlizeMarketV1.sol

The core marketplace contract handles order settlement with multiple layers of protection:

solidity
contract DecenterlizeMarketV1 {
    // EIP-712 domain separator for typed signature verification
    bytes32 public DOMAIN_SEPARATOR;

    // Fee configuration (200 bps = 2%)
    uint256 public constant MARKETPLACE_FEE_BPS = 200;

    // Execute a signed order
    function executeOrder(
        Order calldata order,
        bytes calldata sellerSignature,
        address feeRecipient
    ) external payable nonReentrant {
        // 1. Verify EIP-712 typed signature
        // 2. Check order hasn't expired or been cancelled
        // 3. Transfer NFT (ERC-721 or ERC-1155)
        // 4. Split fees (50% foundation, 50% reward pool)
        // 5. Pay seller
    }

    function cancelOrder(Order calldata order) external;
    function cancelAllOrders() external;
}

Key features:

  • EIP-712 typed signatures. Wallets display human-readable order details before signing. No blind hex signing.
  • ERC-721 and ERC-1155. Both single NFTs and semi-fungible tokens in one contract.
  • Non-reentrant. Reentrancy guard on all state-changing functions via a lock variable.
  • Immutable. No proxy pattern, no upgrade path. The deployed bytecode is final.
  • Deterministic fees. 200 bps hardcoded, split 50/50 between foundation and the reward pool. No governance override.

#EIP-712 Order Structure

typescript
interface EvmSale {
  seller: string;           // Seller address
  contractAddress: string;  // NFT contract
  tokenId: string;          // Token ID
  tokenStandard: "ERC721" | "ERC1155";
  amount: number;           // 1 for ERC-721, N for ERC-1155
  priceWei: string;         // Price in wei
  salt: string;             // Unique salt for replay protection
  expiry: number;           // Expiration timestamp
}

#LocalTokenSwapRouter.sol

Constant-product AMM for marketplace 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;

function removeLiquidity(
    address tokenA,
    address tokenB,
    uint256 lpTokens
) external;
  • Constant-product pricing. x * y = k invariant.
  • 0.3% swap fee. Accrues to liquidity providers.
  • 200 bps marketplace fee. Split 50/50 between foundation and the reward pool.
  • Governance-configurable parameters. Fee rates and pool creation permissions adjustable through protocol governance.

#AppOwnedUniswapV3SwapAdapter.sol

External DEX integration for real token swaps against deep liquidity:

  • Wraps the Uniswap V3 SwapRouter.
  • Applies the marketplace fee layer on top of the external swap.
  • Supports multi-hop routes (e.g., TOKEN_A -> WETH -> USDC).
  • Slippage protection via minAmountOut parameter.

#L2 Support

The same contract deploys identically across all EVM-compatible chains:

NetworkStatusNotes
Ethereum L1SupportedFull settlement
BaseSupportedPrimary L2, lowest fees
ArbitrumSupportedNitro stack
OptimismSupportedOP Stack

Each L2 deployment uses the same bytecode and the same EIP-712 domain structure (chain ID varies). Cross-L2 listings are possible: a seller on Base can have their order filled by a buyer on Arbitrum through the protocol's cross-chain attestation flow.

#TX-Plan Quorum Verification

Before any EVM purchase executes, the transaction plan goes through quorum verification:

  • Purchase plan submission. The buyer's intended transaction (target contract, calldata, value) is submitted as a protocol event.
  • Node verification. Each witness node independently simulates the transaction against their local chain state.
  • 2/3 agreement required. At least 2/3 of selected witnesses must agree the transaction is valid (correct contract, correct parameters, sufficient funds).
  • Execution. Only after quorum agreement does the buyer's transaction get broadcast.

This prevents scenarios where a compromised buyer client submits a malicious transaction that looks valid but interacts with a different contract.

#Rogue Node Detection

The protocol actively detects nodes that propose or attest to malicious contracts:

  • Contract allowlist. Only verified marketplace contract addresses are valid settlement targets.
  • Bytecode verification. Nodes can verify that the deployed bytecode at a contract address matches the expected hash.
  • Strike system. Nodes that propose transactions targeting non-allowlisted contracts receive governance strikes.
  • Automatic eviction. Accumulated strikes lead to bond slashing and network eviction.

#Fee Distribution

text
Sale Price: 1 ETH
├── Marketplace Fee (2%): 0.02 ETH
│   ├── Foundation (50%): 0.01 ETH
│   └── Reward pool (50%): 0.01 ETH
└── Seller Receives: 0.98 ETH

Royalties (if configured by the collection creator) are deducted before the marketplace fee calculation.

#Verification Flow

  • Seller signs EIP-712 order off-chain.
  • Order broadcasts as a signed protocol event to all nodes.
  • Buyer submits purchase intent, triggering TX-plan quorum verification.
  • After 2/3 quorum agreement, buyer submits the transaction to the smart contract.
  • Contract verifies the EIP-712 signature on-chain and executes the transfer.
  • Witness nodes observe the on-chain transaction (TX_OBSERVED).
  • Each witness submits a TX_ATTESTATION event.
  • At 2/3 supermajority attestation, the protocol emits TX_FINALIZED.

#Security

  • Reentrancy protection via lock variable on all state-changing functions.
  • Signature replay protection through nonce + salt uniqueness and per-chain domain separators.
  • No upgradability. Contract is immutable once deployed. No proxy, no admin key.
  • Fee enforcement. Fees are hardcoded and verified on-chain. No governance override.
  • TX-plan quorum. Prevents malicious transaction submission.
  • Rogue node detection. Automatic strike and eviction for misbehavior.
PreviousBitcoin & OrdinalsNext Solana

On this page

  • Ethereum & Layer 2s
  • Smart Contract: DecenterlizeMarketV1.sol
  • EIP-712 Order Structure
  • LocalTokenSwapRouter.sol
  • AppOwnedUniswapV3SwapAdapter.sol
  • L2 Support
  • TX-Plan Quorum Verification
  • Rogue Node Detection
  • Fee Distribution
  • Verification Flow
  • Security