Content
@
0 reply
0 recast
0 reaction
Julie Shi
@julieshi
Hey guys, I have a question about sqrtPriceLimit. It seems that uniswap will do a partial swap if sqrt_p hits the sqrtPriceLimit rather than revert the whole swap - i wonder if my understanding is correct.
2 replies
0 recast
2 reactions
ETHN🦄
@ethn
money fired @julieshi ⠀⠀⠀⠀⠀⠀⠀ ⠀⠀ 🍖 x 8
1 reply
0 recast
1 reaction
Haardik
@haardikkk
You’re right - it seems this has changed a bit. Previously the swap router would revert the transaction if full input wasn’t received but i just checked and looks like it will allow partial swaps now. The source of truth is balance delta now - we’ll update the limit order hook on Monday to work with this design
0 reply
0 recast
2 reactions
saucepoint
@poi
did a quick lil investigation -- partial swaps can be supported! before we run swap logic, we'll check if sqrtPrice is within the user's specified limits assuming it passes, we reach this while loop where we swap until input has been fully used OR sqrtPriceLimit is reached in the latter case this is a partial swap!
0 reply
0 recast
0 reaction