1

My understanding was that one cannot transact more than what is available in a liquidity pool.

However, this transaction seems to prove me wrong:

https://bscscan.com/tx/0xdd38b435d9840062db9106e23712873fa2da44c366fa737b17f7fc6d111ef076#eventlog

Here, 1000000000000000000 worth of BUSD was traded for 172054109197.

However, prior to this trade, the last Sync event describes the following Zombie / BUSD LP balance:

reserve0: 1203765031
reserve1: 6402195517789394391

How is it possible that 172054109197 Zombie tokens were bought if LP had less than that tokens?

0

It is not possible.

The reserve must be greater than the amount out of that reserve. This is enforced by this line of code in the pair contract:

require(amount0Out < _reserve0 && amount1Out < _reserve1, 'Pancake: INSUFFICIENT_LIQUIDITY');

I did not study the transaction that you posted, but you can be sure that the reserve of zombie tokens in the pancake pair was greater than the amount transferred out at the time the swap was made.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.