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

Atomic swaps - how does it actually work with multiple items #11240

Open
exezbcz opened this issue Dec 11, 2024 · 2 comments
Open

Atomic swaps - how does it actually work with multiple items #11240

exezbcz opened this issue Dec 11, 2024 · 2 comments
Labels
A-atomic-swap UX first Improvement for UX

Comments

@exezbcz
Copy link
Member

exezbcz commented Dec 11, 2024

I am a bit confused how this works

  • i will split the potential cases into 3 ones (first number is requested (x), second is my offer(y))

x>y and x=y

i can select three items with no issue
image

  • then, I proceed and i have to select the same amount of items
  • what will be the resulting swap? Am i creating offer 1 for 1 nft that will be random or is it 3 for 3?

x<y

this one is not possible, I think @vikiival mentioned that only 1 for 1 are possible

i am quite curious how will the swap of 3 for 3 items happen, if we have this limitation, we should change the phrasing in the swap creation flow

@exezbcz
Copy link
Member Author

exezbcz commented Dec 11, 2024

cc @hassnian

@exezbcz exezbcz added UX first Improvement for UX A-atomic-swap labels Dec 11, 2024
@hassnian
Copy link
Contributor

hassnian commented Dec 12, 2024

content of an atomic swap (simplified)

  • one desired nft OR entire collection (works the same for offers)
  • one offered nft
  • surcharge: contains price and direction (you can receive or send x amount)
  • expiration

x>y and x=y
i can select three items with no issue
then, I proceed and i have to select the same amount of items
what will be the resulting swap? Am i creating offer 1 for 1 nft that will be random or is it 3 for 3?

you are creating 3 atomic swaps with each atomic swap asking for one nft and offering one nft

because of this limitation and the fact that each atomic swap is accepted individually atm we only accept x = y

if you add surcharge we divide the amount and attach it to each atomic swap

exmaple: if you ask for 1 DOT and you've selected 3 nfts each atomic swap will be asking for 0.333DOT

we should change the phrasing in the swap creation flow

yes, also keep in mind #11227

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-atomic-swap UX first Improvement for UX
Projects
None yet
Development

No branches or pull requests

2 participants