You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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.
The text was updated successfully, but these errors were encountered:
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:
slot0
is incompatible with uniswap v3, this ruined my afternoon. 😭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 returnedfeeProtocol
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.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.
The text was updated successfully, but these errors were encountered: