Skip to main content
The XenarchSplitter is a minimal Solidity contract that splits incoming USDC payments between content publishers and the Xenarch treasury. It is the single settlement mechanism for all Xenarch payments.

Deployments

NetworkAddressUSDC
Base Mainnet0xC6D3a6B6fcCD6319432CDB72819cf317E88662ae0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913
Base Sepolia0x7ecfe8f83eab6ba170063d1f1fe7c33695a9ce1d0xc5aDdd66Da733101A5468857Aa3C6689Af9d1DDc (mock)
Both contracts are verified on Basescan.

How it works

  1. Agent approves USDC on the splitter contract
  2. Agent calls split(collector, amount) where collector is the publisher’s wallet
  3. Contract calculates fee: fee = (amount * feeBps) / 10_000
  4. Contract transfers amount - fee to publisher, fee to treasury
  5. Contract emits a Split event with payer, collector, amount, and fee

Key properties

PropertyValue
Fee0% (currently), capped at 0.99% forever
Max payment$1.00 (1,000,000 USDC satoshis)
Min payment$0.000001 (1 USDC satoshi)
Fee capMAX_FEE_BPS = 99 — immutable constant, cannot be changed
PausableOwner can pause splits for emergencies
USDC onlyHardcoded to USDC on Base

Security

  • Immutable fee cap: The MAX_FEE_BPS constant cannot be changed after deployment. Publishers are guaranteed fees will never exceed 0.99%.
  • SafeERC20: Uses OpenZeppelin’s SafeERC20 for all USDC transfers.
  • No reentrancy risk: No external calls before state changes.
  • Verified source: Bytecode published and verified on Basescan.
  • Minimal surface: 57 lines of Solidity. Single responsibility.

Building from source

# Install Foundry
curl -L https://foundry.paradigm.xyz | bash
foundryup

# Clone and build
git clone https://github.com/xenarch-ai/xenarch-contract
cd xenarch-contract
forge build

# Run tests
forge test -vvv