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

Can't send two swap transactions in the same round. #2

Open
nullun opened this issue Aug 24, 2021 · 0 comments
Open

Can't send two swap transactions in the same round. #2

nullun opened this issue Aug 24, 2021 · 0 comments
Labels
bug Something isn't working enhancement New feature or request

Comments

@nullun
Copy link
Contributor

nullun commented Aug 24, 2021

Due to the first transaction in all groups being the same (send 0.002 Algo from sender to escrow for the fees), the transaction ID will be the same if you attempt to create two different swaps and send them within the same round.

The issue is similar to an old bug when you trying to trade 0.002 Algo for any other ASA and the group transaction would fail saying the transaction already exists, The resolution was to add "fee" into the node field. However because when you send two separate swaps each group has its own "fee" transaction with identical parameters, the second group will always fail because the fee transaction already exists in this round (if the round was different and the firstvalid and last valid were shifted by 1 it would be a different txid).

My temporary solution to this was to dump 8 random bytes of data into the note field instead of "fee".

@gokselcoban gokselcoban added bug Something isn't working enhancement New feature or request labels Nov 16, 2022
gokselcoban added a commit that referenced this issue Dec 16, 2022
gokselcoban added a commit that referenced this issue Dec 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants