feat: prevent permit2.permit frontrun #14
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #9
This PR port the same fix on v4-periphery on universal router
ref fix on periphery: pancakeswap/pancake-v4-periphery@e9876ae#diff-ddeb661b27108ab4906ab13bc6580108952c80a33170dfae362c33085b3c333d
On universal router front,
PERMIT2_PERMIT
andPERMIT2_PERMIT_BATCH
command will supportALLOW_REVERT
(can see test), so if permit2 was front-run, other following commands can still execute