Let's use this transaction as an example.
Here 1 BUSD was transferred to Zombie / BUSD LP in exchange for 172054109197
Zombie tokens. (3511308350
(2%) Zombie tokens were burned as part of the transaction.)
Here is the Swap event:
amount0In: 0
amount1In: 1000000000000000000
amount0Out: 175565417547
amount1Out: 0
Prior to the Swap, the reserve values were:
reserve0: 1203765031
reserve1: 6402195517789394391
after Swap, reserve values were updated to:
reserve0: 173257874228
reserve1: 44614233592769925
Everywhere that I've read, it is stated that constant product formula (x*y=k
) requires that the k
remains constant. However, this isn't the case here.
1203765031*6402195517789394391=7,706,739,085,939,811,390,553,341,121
173257874228*44614233592769925=7,729,767,272,594,744,235,790,992,900
Am I misunderstanding the function of the formula or is something else going on here?