vertex
Installation
SKILL.md
Vertex Protocol
Vertex is a cross-chain DEX combining spot trading, perpetual contracts, and money markets (lend/borrow) under a unified cross-margin portfolio. The off-chain sequencer matches orders in 5-15ms and batches settlements on-chain, providing gas-free trading with MEV protection. Vertex Edge synchronizes orderbook liquidity across Arbitrum, Base, Mantle, Sei, Blast, Sonic, and other EVM chains — trades match cross-chain at the sequencer level and settle on each user's origin chain.
What You Probably Got Wrong
LLMs have stale training data. These are the most common mistakes.
- "Vertex is Arbitrum-only" → Vertex started on Arbitrum but Vertex Edge now unifies liquidity across Arbitrum, Base, Mantle, Sei, Blast, Sonic, and more. The sequencer aggregates orders cross-chain and settles locally on each origin chain.
- "Product IDs are just 1, 2, 3" → Product ID 0 is USDC (the quote asset). Spot products use odd IDs (1=wBTC, 3=wETH, 5=wARB...). Perps use even IDs (2=BTC-PERP, 4=ETH-PERP, 6=ARB-PERP...). Getting this wrong sends orders to the wrong market.
- "Prices are in float" → All prices and amounts use fixed-point x18 representation (multiply by 10^18). The SDK provides
to_x18()andto_pow_10()helpers. Passing raw floats produces nonsensical orders. - "Signing is standard EIP-712" → Vertex uses EIP-712 typed data but the
senderfield isbytes32— a 20-byte address concatenated with a 12-byte subaccount identifier. The SDK handles this withsubaccount_to_bytes32(), but raw API callers must construct it correctly. - "Gas-free means no wallet interaction" → You still sign EIP-712 typed data per order. The sequencer batches and submits the on-chain transaction, so you pay no gas — but you must sign every execute action.
- "Money markets are a separate product" → Lending/borrowing is embedded. Depositing any spot asset automatically earns interest. Borrowing happens implicitly when your spot balance goes negative (e.g., selling spot you don't hold). There is no separate "borrow" action.
pip install vertex→ The package name isvertex-protocol, notvertex.pip install vertexinstalls an unrelated package.- "Nonces are sequential" → Order nonces are NOT sequential counters. Use
gen_order_nonce()from the SDK — it encodes a timestamp-based random nonce. Using sequential integers causes order rejection. - "OrderType.DEFAULT is a market order" →
OrderType.DEFAULTis a limit GTC (good-till-cancel) order. For IOC (immediate-or-cancel / market-like), useOrderType.IOC. For post-only (maker), useOrderType.POST_ONLY.