Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is there a list on the differences between pancake v3 and uniswap v3? #24

Open
wellttllew opened this issue Jun 26, 2024 · 0 comments
Open

Comments

@wellttllew
Copy link

wellttllew commented Jun 26, 2024

We have a protocol that works very well in uniswap v3.
But it is quite tough to make it also work in pancake swap v3.

Here are some our findings:

  • The pool address derivation is different: pancake has a separate pool deployer.
  • The slot0 is incompatible with uniswap v3, this ruined my afternoon. 😭
    • We use the Uniswap V3 Pool interface to interact with a pancake pool, it reverts without any message. It turned out this reverts on the compiler generated validation code. As the returned data from slot0 is abi encoded, the returned data from either uniswap v3 or pancake v3 pool has the same length (i.e, uint8 or uint32 are both encoded as a 32-byte word in the return data). However, When I use the Uniswap v3 pool interface, the compiler would check the returned feeProtocol is less than unit8.Max, if it is greater than that, it would revert without any messages. It takes me a whole afternoon to find clues in the op codes.

image

I am wondering if there is a complete list on the differences between pancake v3 and uniswap v3?
This would make the developers who wants to integrate your protocol much easier.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant