EVM and Solana contract reference. DecenterlizeMarketV1, LocalTokenSwapRouter, AppOwnedUniswapV3SwapAdapter, staking programs, and deployment details.
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.
The core marketplace contract for EVM chains. Handles order execution with EIP-712 typed signature verification:
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:
Constant-product AMM for marketplace-native token markets:
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);External DEX integration wrapping Uniswap V3:
minAmountOut.Anchor program for SPL marketplace operations:
#[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.
Anchor program for node operator staking:
| Contract | Networks |
|---|---|
| DecenterlizeMarketV1 | Ethereum, Base, Arbitrum, Optimism |
| LocalTokenSwapRouter | Ethereum, Base, Arbitrum, Optimism |
| AppOwnedUniswapV3SwapAdapter | Ethereum, Base (where Uniswap V3 is deployed) |
| agorix_marketplace | Solana |
| agorix_staking | Solana |
Each EVM deployment uses the same bytecode. Chain-specific parameters (chain ID in the EIP-712 domain separator) are set at construction time.
contracts/ (Solidity) and programs/ (Anchor).