Closed
Conversation
MartinquaXD
reviewed
Mar 4, 2026
src/infra/dex/bitget/dto.rs
Outdated
Comment on lines
+64
to
+65
| /// Target chain name (same as from_chain for same-chain swaps). | ||
| pub to_chain: ChainName, |
Contributor
There was a problem hiding this comment.
Interesting! So in the cross chain version of cow protocol this solver could already be used. 🚀
MartinquaXD
approved these changes
Mar 4, 2026
Contributor
MartinquaXD
left a comment
There was a problem hiding this comment.
PR looks alright to me but it's always hard to know this definitively when integrating a new API. Can you run this a little bit on staging as a sanity check before merging?
fafk
reviewed
Mar 4, 2026
fafk
reviewed
Mar 4, 2026
fafk
reviewed
Mar 4, 2026
Contributor
Author
Yeah, as soon as the solver is whitelisted. Also, the approach was simplified and now it uses a single |
fafk
approved these changes
Mar 4, 2026
Contributor
Author
|
In favor of cowprotocol/services#4249 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The Bitget API uses a two-step POST flow:The BitGet team suggested using thequote(to get the optimal routing market and output amount) followed byswap(to get the on-chain calldata)request_mod="rich"param in the/swapAPI, which makes the response contain much more data, including theoutAmount.To mitigate the race condition betweenNot needed anymore because of the previous pointquoteandswapcalls, slippage is applied to the quoted output and passed astoMinAmountto the swap endpoint, ensuring consistency between what the calldata enforces on-chain and what the solver reportsexactOutmodeChanges
config/example.bitget.toml- Example configurationHow to test
New unit and manual e2e tests (ignored by default).