- whose address owns the USDC and positions
- who signs the transaction payload
- whether submission happens as a normal EOA transaction or a gasless Safe user operation
Mode matrix
| Mode | Trader funds live in | Signer | Submitter | Typical use |
|---|---|---|---|---|
self-self | trader EOA | trader EOA | trader EOA | wallet-driven apps, bots, simple scripts |
self-gasless | trader EOA | trader EOA | trader Safe | client apps that want gasless trading after one-time setup |
delegated-self | trader EOA | delegate EOA | delegate EOA | backend execution on behalf of users |
delegated-gasless | trader EOA | delegate EOA | delegate Safe | gasless backend execution on behalf of users |
read-only | n/a | none | none | dashboards, analytics, price and account views |
Build-only vs submit-capable clients
Every mode can be created in two ways:- submit-capable: pass a private key and let the SDK sign and submit
- build-only: pass addresses only and use
get*Tx()to return unsigned transaction data for your own wallet or Safe flow
Configuration
All modes share a common set of optional settings —testnet, slippageBps, builder, subgraphUrl, builderApiUrl, and alchemyApiKey (required for streamAccountUpdates()). See Client Configuration for the complete parameter reference across every mode, including required fields and build-only variants.
Choose the right mode
- Use Self + Self when the trader signs and pays gas directly.
- Use Self + Gasless when the trader still owns the account but you want a gasless UX after setup.
- Use Delegated + Self when your backend executes for users and a delegate EOA pays gas.
- Use Delegated + Gasless when your backend executes for users but you want sponsored Safe submission.
- Use Read-only when your app only needs data.
Related
- Client Configuration — every parameter accepted by the factory methods.
- Testnet explains how
testnet: truechanges the SDK defaults.