Run AI agents on zkSync Era — Ethereum's highest-throughput ZK rollup. Sub-$0.01 fees, native account abstraction, SyncSwap DEX integration. Purple Flea handles wallets, transfers, and swaps. No KYC, no monthly minimums.
zkSync Era (chain ID 324) is built by Matter Labs and secured by Ethereum via ZK validity proofs. Every transaction is cryptographically proven correct — no fraud windows, no challenge periods.
zkSync Era implements native account abstraction at the protocol level. Unlike Ethereum ERC-4337 where AA is a smart contract layer on top of EOAs, zkSync Era makes every account programmable by default. This means AI agents can use features like batched transactions, custom signature schemes, and gasless meta-transactions without any extra infrastructure.
For trading agents, native AA means a single transaction can approve a token spend and execute a swap — eliminating the double-gas overhead that plagues ERC-20 trading on standard EVM chains. An agent that opens 100 positions per day saves significantly in gas costs compared to running the same strategy on mainnet or even Arbitrum.
Session keys are another native AA feature well-suited to agents: an agent can generate a short-lived key that is only authorized to call one specific contract (e.g., SyncSwap router) up to a spending limit. This limits blast radius if an agent's key is ever compromised, while still allowing fully automated operation.
Purple Flea abstracts zkSync Era complexity into clean API calls. Agents get a dedicated zkSync wallet, send ETH and ERC-20 tokens, and swap on SyncSwap — all via a single HTTP endpoint with no private key management required on the agent side.
Provision a non-custodial zkSync Era wallet in milliseconds. Returns address, supports ETH and all major ERC-20 tokens. Compatible with native AA out of the box.
Send ETH or USDC to any zkSync address for under $0.001. Ideal for micro-payment agents making dozens of transfers per hour — fee costs become negligible.
Swap any ERC-20 pair on SyncSwap V2 — zkSync's leading DEX with $200M+ TVL. Classic and Stable pools available. Route optimization included.
Execute approve + swap atomically via native AA. No double-transaction pattern needed for ERC-20 swaps. Reduces gas by up to 40% vs standard approach.
Check ETH and ERC-20 balances, pending transactions, and historical transfers for any zkSync address. Useful for agent treasury monitoring.
Move funds between zkSync Era and Ethereum mainnet. Deposits via zkSync bridge (~15 min), withdrawals via ZK proof (~24 hours to L1 finality).
SyncSwap is the primary AMM on zkSync Era, offering Classic pools for volatile pairs and Stable pools for pegged assets. Purple Flea routes swaps automatically through the optimal pool type.
import PurpleFlea from '@purpleflea/sdk'; const flea = new PurpleFlea({ apiKey: process.env.PURPLE_FLEA_API_KEY }); // 1. Create a zkSync Era wallet const wallet = await flea.wallet.create({ chain: 'zksync' }); // { address: '0x...', chain: 'zksync', chainId: 324 } // 2. Send ETH on zkSync (~$0.001 fee) const transfer = await flea.wallet.send({ chain: 'zksync', from: wallet.address, to: '0xRecipient...', amount: '0.01', token: 'ETH' }); // { txHash: '0x...', fee: '0.00000087', feeCurrency: 'ETH' } // 3. Swap ETH → USDC on SyncSwap const swap = await flea.swap.execute({ chain: 'zksync', fromToken: 'ETH', toToken: 'USDC', amount: '0.05', slippage: 0.5, wallet: wallet.address }); // { txHash: '0x...', amountOut: '182.41', dex: 'SyncSwap' } // 4. Batch approve + swap (native AA — one transaction) const batchSwap = await flea.swap.executeBatch({ chain: 'zksync', fromToken: 'USDC', toToken: 'WETH', amount: '100', wallet: wallet.address, useNativeAA: true // approve + swap in one tx }); // { txHash: '0x...', batchSize: 2, savedGas: '43%' }
Purple Flea supports all major tokens in the zkSync Era ecosystem. New tokens are added automatically as liquidity appears on SyncSwap.
The native ZK governance token can be swapped directly. MUTE and HOLD are native zkSync DeFi tokens with significant liquidity on SyncSwap Classic pools. cbETH and rETH enable liquid staking strategies directly on L2 without bridging back to mainnet.
Not all L2s are equal. Here is how zkSync Era compares to StarkNet, Polygon zkEVM, Arbitrum One, and Optimism across the dimensions that matter most to agent workloads.
| Network | Proof Type | Avg Fee | Finality | Native AA | EVM Compatibility |
|---|---|---|---|---|---|
| zkSync Era | ZK (PLONK) | <$0.001 | ~2s | Native | zkEVM |
| StarkNet | ZK (STARK) | <$0.01 | ~30s | Native | Cairo (not EVM) |
| Polygon zkEVM | ZK (FFLONK) | <$0.01 | ~10s | ERC-4337 | Full EVM |
| Arbitrum One | Optimistic | ~$0.02 | ~1s | ERC-4337 | Full EVM |
| Optimism | Optimistic | ~$0.03 | ~2s | ERC-4337 | Full EVM |
zkSync Era's combination of native AA, sub-cent fees, and Ethereum security creates a unique environment for agent-driven financial applications.
Agents that pay sub-agents per task, per API call, or per inference step. At $0.001 per transaction, an agent can make 1,000 micro-payments for $1. Native AA batching lets multiple payments settle in a single on-chain transaction, cutting costs further.
Use a Paymaster to sponsor gas for new agent wallets. Deploy a fleet of trading agents with zero ETH balance — the Paymaster deducts fees from a shared USDC pool. Batch approve + swap in one AA transaction for maximum efficiency.
Orchestrator agents pay worker agents on zkSync for completed tasks. Combine with Purple Flea Escrow for trustless settlement: funds only release when work is verified. All at a fraction of mainnet cost.
Compound yield on zkSync DeFi protocols. Swap between liquid staking tokens (rETH, cbETH), provide SyncSwap liquidity, and auto-rebalance positions — all for negligible gas costs that don't eat into yield.
Spot price discrepancies between zkSync Era and Ethereum mainnet, or between zkSync and Arbitrum via the Purple Flea cross-chain swap API. Fast finality (~2s) means arb windows don't close before the agent can act.
Grant a trading bot a session key with a $500 daily spending limit on SyncSwap only. The bot runs autonomously with limited blast radius. Revoke at any time via the Purple Flea API. No manual signing required.