Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update: update CoW Swap limit order to zero fee amount #1911

Conversation

berteotti
Copy link
Collaborator

Convert CoW Protocol limit orders to zero-signed fee orders

--FROM--
Sell token: A
Sell amount: x
Fee: f
Buy token: B
Buy amount: y

--TO--
Sell token: A
Sell amount: x + f
Fee: 0
Buy token: B
Buy amount: y

Related to https://snapshot.org/#/cow.eth/proposal/0xfb81daea9be89f4f1c251d53fd9d1481129b97c6f38caaddc42af7f3ce5a52ec

@berteotti berteotti changed the title update: update CoW swap to zero fee amount update: update CoW Swap limit order to zero fee amount Mar 7, 2024
@Diogomartf
Copy link
Collaborator

The diff seems not correct, can we fix it? Maybe with rebase.

@berteotti berteotti force-pushed the update/swa-147-update-to-support-cow-swap-to-zero-signed-fee-orders branch from 4e93411 to e9213cf Compare March 7, 2024 13:50

const signedResult = await cowSdk.signOrder({
buyAmount,
buyToken,
sellAmount,
sellToken,
feeAmount, // from CoW APIs
feeAmount: '0', // from CoW APIs
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
feeAmount: '0', // from CoW APIs
feeAmount: '0',

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed!

@berteotti berteotti force-pushed the update/swa-147-update-to-support-cow-swap-to-zero-signed-fee-orders branch from e9213cf to e8bc11f Compare March 11, 2024 14:39
@berteotti berteotti merged commit b712d77 into develop Mar 11, 2024
12 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants