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

Remove affiliate fees from final amount when trading with Jupiter #8436

Closed
NeOMakinG opened this issue Dec 21, 2024 · 1 comment
Closed

Remove affiliate fees from final amount when trading with Jupiter #8436

NeOMakinG opened this issue Dec 21, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@NeOMakinG
Copy link
Collaborator

Overview

We need to minus fees from the amount when swapping through jupiter, this TX:
https://explorer.solana.com/tx/Vz8vTMwFhqZirVnstdiZGDfJCq7ACkC6bCNJ2acakmr6E5vrDnRGFcHSTxVxEJ7YWAqpAeP1ThaHpQ9V6YttdrG

It displayed 5.18 SOL while it should display 5.16 SOL because affiliate fees are 5$ (around 0.017 SOL at this time)

References and additional details

Spotted in https://discord.com/channels/554694662431178782/1316422691191918754/1319831733692141633

Acceptance Criteria

  • Fees are not included in the receive amount of a swap using Jupiter

Need By Date

No response

Screenshots/Mockups

No response

Estimated effort

No response

@0xean 0xean moved this from Backlog to Up next / groomed in ShapeShift Dashboard Jan 6, 2025
@0xean 0xean added the bug Something isn't working label Jan 6, 2025
@NeOMakinG NeOMakinG self-assigned this Jan 7, 2025
@NeOMakinG NeOMakinG moved this from Up next / groomed to In progress in ShapeShift Dashboard Jan 7, 2025
@NeOMakinG
Copy link
Collaborator Author

So, after investigation:

It looks like the amount is "fine" as other swappers, looking at:
https://explorer.solana.com/tx/Vz8vTMwFhqZirVnstdiZGDfJCq7ACkC6bCNJ2acakmr6E5vrDnRGFcHSTxVxEJ7YWAqpAeP1ThaHpQ9V6YttdrG

And

Image

It's working like any other swapper inside our app, fees are displayed separately from the amount

And the different amount is due to slippage, 5.18 with 1% slippage can lead to minimum 5.12 as SOL amount, so, 5.16 SOL is an acceptable amount

As any other swapper in our app, we are not displaying the final amount after execution but only the expected from our simulation

This issue can be closed (I guess? Unless I'm wrong?)

I seen another issue about TX history parsing where the SOL amount says 0 SOL instead of 5.165 thought, there is an issue already

@NeOMakinG NeOMakinG moved this from In progress to Done in ShapeShift Dashboard Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done
Development

No branches or pull requests

2 participants