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

make the lockedToken and amount clearly visible on swap UI #32

Open
pseudozach opened this issue Sep 21, 2023 · 0 comments
Open

make the lockedToken and amount clearly visible on swap UI #32

pseudozach opened this issue Sep 21, 2023 · 0 comments

Comments

@pseudozach
Copy link
Owner

TMS-5
File(s):
sip10swap_v3.clar
Description: The lockToken function checks if a preimage hash is already in use with (is-eq (map-get? swaps {hash: preimageHash}) none). If an attacker can predict or know the hash an honest user intends to use (for example, by monitoring unconfirmed transactions), they can "front-run" the user by creating a swap with the same hash. This would block the honest user's swap due to the (err err-hash-already-exists) check.

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

No branches or pull requests

1 participant