CoW Swap
Swap tokens on Gnosis with CoW Swap. Your agent signs a gasless order from its own wallet, solvers compete to fill it, and the tokens always come back to that wallet.
Your agent can swap tokens on Gnosis with CoW Swap, the swap app of CoW Protocol. It doesn't send a swap transaction. It signs an order, and CoW's solvers compete to fill it at the best price they can find. If no solver can fill the order before it expires, nothing is traded.
Category: Trading ยท Chain: Gnosis ยท Testnet: EEZ-X (CoW Light)
Swap
Ask your agent:
- Signing an order costs no gas. The only transaction is an approval: when CoW isn't yet allowed to use enough of the sell token, the agent first approves exactly the amount being sold. Thirdfy pays the gas for that approval on Gnosis, so the agent's wallet needs no xDAI.
- The tokens always return to the agent's wallet. The wallet policy refuses any order that pays someone else.
- Slippage is bounded. The default is 0.5%, and the most an order can allow is 10%.
- The order waits for a fill. It stays open for up to 20 minutes, unless you set another time. Your agent waits up to a minute for the fill, then tells you the order is still open. Don't place it again: check it with
get_cow_order. - Cancelling. Your agent can cancel an open order on a wallet Thirdfy manages. On a wallet you control with your own signed policy, cancel isn't available: an open order simply expires at the end of its time.
- One open order per sell token. Wait for an open order to fill or expire before placing another that sells the same token. Two open orders share one approval, so the second one can't fill and expires. No funds are lost.
- Native xDAI isn't sold directly. Wrap it to WXDAI first.
How an order is filled
- Your agent asks CoW for a quote: the amount it expects to receive after network costs.
- It signs an order to sell an exact amount, with the least it accepts set by the slippage.
- CoW's solvers compete to fill the order. The winner settles it on Gnosis and pays the network cost out of the trade.
- The bought tokens arrive in the agent's wallet. If no solver fills the order in time, it expires and nothing moves.
CoW Light on the EEZ-X testnet
Testnet only. CoW Light trades test tokens with no value.
The Ethereum Economic Zone runs its own CoW deployment, CoW Light, on the EEZ-X testnet (chain ID 699169). Use the same actions with chainId: 699169:
- It sells test ctWETH for the listed test tokens. Get test ctWETH with
eez_claim_test_tokens. - Its solver fills the order across EEZ-X and Gnosis Chiado in one transaction.
- The approval is paid by the wallet in test xDAI.
- CoW Light orders can't be cancelled. They expire at the end of their time.
For developers
Catalog provider: cow
| Action | Kind | Params |
|---|---|---|
get_cow_quote | read | sellToken, buyToken (addresses), sellAmount (whole tokens), optional chainId (100, or 699169 for CoW Light). Returns the expected amount out and minBuyAmountAtDefaultSlippage |
place_cow_order | write | Same as the quote, plus optional slippageBps (0 to 1000, default 50), validForSeconds (60 to 3600, default 1200) and waitForFillSeconds (0 to 90, default 60). Returns expectedBuyAmount and the order UID |
get_cow_order | read | orderUid. Status open, fulfilled, cancelled or expired, filled amounts and a CoW Explorer link |
cancel_cow_order | write | orderUid. Cancels an open order on Gnosis. Not on EEZ-X |
place_cow_order answers executed (filled), pending (still open after the wait; it may fill until it expires) or not_filled (cancelled or expired). An order for a different chain than the agent's wallet is refused before anything is sent (COW_WALLET_CHAIN_MISMATCH).
Use search_tokens to get token addresses on Gnosis. Orders carry the app code Thirdfy.