Skip to content

how swap from 1 token to usdt without direct pair? and fees on swap from token to eth #67

Answered by Elnaril
facilficom asked this question in Q&A
Discussion options

You must be logged in to vote

for the 3 token path example, it seems on a universal router they passed the first amountout swap to the address pair and then make the other swap, i think this is the problem. https://bscscan.com/tx/0xff8b9f7daab571a44b7ba952c6b7fb471237f58975d0b16ac06a283f244e9e48#eventlog

This is the decoded input data used in the transaction you linked:

(<Function execute(bytes,bytes[],uint256)>,
 {'commands': b'\x08',
  'inputs': [(<Function V2_SWAP_EXACT_IN(address,uint256,uint256,address[],bool)>,
              {'recipient': '0xEd4FF665F61B36A63dFA260F6C8CcFB389d79C19',
               'amountIn': 162262162497017081,
               'amountOutMin': 386689736694041613984,
               'path': ['0x…

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
1 reply
@facilficom
Comment options

Comment options

You must be logged in to vote
2 replies
@facilficom
Comment options

@Elnaril
Comment options

Answer selected by facilficom
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants