Repository navigation
Conversation
Integrators keep using quote.buyAmount (after network costs) as a generic toAmount next to other aggregators' before-gas amounts, so CoW ranks last even at an equal price. Add a "Displaying and Comparing Quotes" section, fix the quickstart to build the order from quoteResponse.quote, and link the amount-stage math on the concepts page. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
|
|
||
| Settlement network costs are already reflected in `quote.buyAmount`; `quote.feeAmount` describes those costs in the sell token, not an additional amount to deduct from the output. | ||
| Other aggregators usually return their output **before** gas, which the user pays on top. | ||
| Shown side by side as-is, CoW Protocol ranks lower even at the same price. |
There was a problem hiding this comment.
Change to: When quotes are shown side by side as-is, CoW Protocol ranks lower even at the same price.”
There was a problem hiding this comment.
Done. It now reads "When quotes are shown side by side as-is, …".
|
|
||
| ### Example | ||
|
|
||
| Selling 10 USDT for USDC at a 1:1 price, with 0.40 USDT of network costs and no protocol or partner fee (illustrative numbers). |
There was a problem hiding this comment.
we say USDT here but USD in other places. Confirm if they're the same thing and correct.
There was a problem hiding this comment.
They weren't the same thing. USDT is the sell token, and CoW's feeAmount is in sell-token units, so "0.40 USDT of network costs" was right. "0.40 USD" was the dollar value of the gas the user pays in ETH with the other aggregator. The example now says that gas is "worth 0.40 USDC", and the table headers show the amounts are in USDC.
…er-1ad774 # Conflicts: # docs/cow-protocol/integrate/api.mdx
What changed
sellAmount,feeAmount, andbuyAmountfor sell quotes.quoteResponse.quote, signsellAmount + feeAmountwithfeeAmount: "0", apply slippage, handleappData, and submitquoteIdandfrom.Why
Direct API integrators can mistake
quote.buyAmountfor a before-gas output. For sell orders, it already reflects network costs and the applicable protocol fee. Comparing it with another provider’s before-gas output makes CoW look worse even when its net price is better.Ambire recently encountered this (AmbireTech/ambire-common#2779). These changes explain the returned amounts where API integrators first encounter them and show how to compare quotes on the same basis.