CRYPTO NEWS

6 Questions for Kim Hamilton Duffy of Centre

Question about constant product AMM swap function

My understanding is that there are two main flows when one wants to swap within a constant product AMM LP: Trader transfers a certain amount of Token X into the LP An equivalent of Token Y is transferred to Trader Assuming that both Token X and Token Y are ERC-20 compliant, are there any issues::Listen

My understanding is that there are two main flows when one wants to swap within a constant product AMM LP:

  1. Trader transfers a certain amount of Token X into the LP

  2. An equivalent of Token Y is transferred to Trader

Assuming that both Token X and Token Y are ERC-20 compliant, are there any issues if I use transfer() for both Flow 1 and Flow 2? Or, should I actually be using transferFrom() instead?

6 Questions for Kim Hamilton Duffy of Centre

Shopping cart
There are no products in the cart!
Continue shopping
0