Non-Custodial Safe Swap & Cross-Chain Bridge Router API (EVM & Solana)
Prepare ready-to-sign token swaps across Base, Ethereum, Arbitrum, Optimism, Polygon, and Solana, as well as cross-chain transfers between EVM networks and Solana. Freedom Engine never holds funds or private keys: it returns unsigned transaction data for local signing after automated sanctions, honeypot, and slippage verification.
What does a non-custodial swap and bridge builder do, and why is it safer for new users?
Normally, decentralized exchanges require querying multiple liquidity aggregators, manually checking token contracts for transfer taxes or traps, and auditing ERC-20 token approvals. Freedom Engine performs those checks automatically before returning the transaction: (1) it verifies both sender and token contracts against Chainalysis Sanctions Oracle, GoPlus Address Security, and the OFAC SDN list; (2) it limits ERC-20 token approvals to the exact trade amount rather than unlimited allowances; (3) it enforces a strict 1.5% maximum slippage cap; and (4) it signs every quote with HMAC-SHA256 (30-second validity). Your wallet or agent signs and broadcasts the transaction directly, keeping full custody of assets at all times.
How much does it cost compared to standard wallet swap interfaces?
Same-chain swaps built through /api/v1/router/tools/swap-build carry a 5-Sat ($0.005 USDC) API build fee plus a transparent 0.45% (45 bps) protocol fee included in the quote. Cross-chain bridges built through /api/v1/router/tools/bridge-build carry an 8-Sat ($0.0075 USDC) API build fee plus a 0.50% (50 bps) fee. Pre-flight validation (?dryRun=true) and cross-chain settlement tracking (/api/v1/router/tools/swap-status) are free (0 Sats). For reference, standard retail wallet swap interfaces typically charge 0.85%-0.875% without programmatic HTTP 402/MCP automation or pre-trade AML and honeypot guards.
Technical Specifications, Endpoints & Pricing Matrix
| Capability / Route | Endpoint / Protocol | Technical Summary | Rate / Guarantee |
|---|---|---|---|
| 1. Preview & Validate (Free) | POST /api/v1/router/tools/swap-build?dryRun=true | Verifies chains, tokens, AML & limits with zero charge | FREE (0 Sats) |
| 2. Same-Chain Safe Swap | POST /api/v1/router/tools/swap-build | Unsigned EVM (ParaSwap v6.2) & Solana (Jupiter) calldata | 5 Sats + 0.45% fee |
| 3. Cross-Chain Bridge | POST /api/v1/router/tools/bridge-build | Base <-> Solana <-> EVM via Relay & LI.FI with same-owner policy | 8 Sats + 0.50% fee |
| 4. Settlement Tracker (Free) | GET /api/v1/router/tools/swap-status | Live cross-chain Relay requestId & LI.FI txHash polling | FREE (0 Sats) |
| Retail Wallet Benchmark | Standard Wallet Swap UIs | Typical convenience fee without API/MCP or AML/honeypot suite | 0.85%–0.875% (Reference) |
Quickstart Code & Pre-Flight Dry-Run Example
Test payload validation for 0 Sats using ?dryRun=true or authenticate immediately via L402, x402, or a 0ms Prepaid Session Pass. Primary endpoint: /api/v1/router/tools/swap-build (0–8 Sats + 0.45%–0.50% / $0.00–$0.0075 USDC + fee).
# Step 1: Preview safely at zero cost (?dryRun=true)
curl -s -X POST "https://m2mfreedom.com/api/v1/router/tools/swap-build?dryRun=true" \
-H "Content-Type: application/json" \
-d '{"chain":"base","sellToken":"USDC","buyToken":"ETH","amount":25,"userAddress":"0xYourWalletAddress"}'
# Step 2: Build unsigned Base -> Solana USDC cross-chain bridge (8 Sats + 0.50%)
curl -s -X POST "https://m2mfreedom.com/api/v1/router/tools/bridge-build" \
-H "Authorization: Bearer m2m-pass-<hex>" \
-H "Content-Type: application/json" \
-d '{"fromChain":"base","toChain":"solana","fromToken":"USDC","toToken":"USDC","amount":25,"userAddress":"0xYourEvmAddress","recipient":"YourSolanaAddress"}'
# Step 3: Sign locally in MetaMask/Phantom/AgentKit and track settlement for free
curl -s "https://m2mfreedom.com/api/v1/router/tools/swap-status?provider=relay&requestId=0x..."
Architecture Notes & Operational Guarantees
Three-Step Beginner Workflow: (1) Run ?dryRun=true at zero cost to validate inputs; (2) call swap-build or bridge-build to receive screened, unsigned calldata; (3) sign and submit the transaction locally using MetaMask, Phantom, viem, ethers, or @solana/web3.js, and monitor bridges free via swap-status.
Pre-Trade Protection Stack: Automated screening against Chainalysis Sanctions Oracle, GoPlus Address Security, and OFAC SDN in RAM; anti-honeypot contract verification; exact-amount ERC-20 approvals (zero MAX_UINT256); and 30-second HMAC-SHA256 quote integrity checks. Full policy at /legal#swap-router.
Frequently Asked Questions
Does Freedom Engine ever hold my tokens or ask for my private key?
No. All swap and bridge responses return unsigned transaction objects and EIP-20 approval data (for the exact amount only). Signing and broadcasting occur exclusively inside your own wallet, Coinbase AgentKit signer, or browser extension.
Which blockchains, limits, and safety controls are enforced?
Same-chain swaps support Base, Ethereum, Arbitrum, Optimism, Polygon, and Solana. Cross-chain bridges support Base, Solana, Ethereum, Arbitrum, Optimism, and Polygon. Transactions are capped at $2,500 per operation and $10,000 per wallet over 24 hours, with a maximum 1.5% (150 bps) slippage tolerance, opacity-asset blocks (TORN, XMR, ZEC, RAIL), and a same-owner rule preventing transfers to third-party wallets.
Where can I review the legal and compliance disclosures for this router?
Read the full bilingual disclosures covering AML screening, OFAC/sanctions blocks, quote expiration, and operational limits at https://www.m2mfreedom.com/legal#swap-router.