Content
@
0 reply
0 recast
2 reactions
GIGAMΞSH
@gigamesh
Anyone know how to programmatically get the token amounts from Uniswap positions? I thought this was on the right track but the output is wrong: https://gist.github.com/gigamesh/a3913588ff950b940756491a8dfadd72 Following this as a guide: https://docs.uniswap.org/contracts/v4/concepts/managing-positions
3 replies
4 recasts
28 reactions
Stas
@stas
Check how we did it at @velodrome / @aerodrome This Sugar helper exposes library functions to return amounts: https://github.com/velodrome-finance/slipstream/blob/main/contracts/periphery/SugarHelper.sol#L131-L138
1 reply
0 recast
3 reactions
Stas
@stas
Next LpSugar beautifully returns the position data based on the ID of the nft: https://github.com/velodrome-finance/sugar/blob/v3/contracts/LpSugar.vy#L740-L742
1 reply
0 recast
1 reaction