Return to site
Return to site

Mentorship Series #21

0xfirefirst - Day 22

· Mentorship

We continued the Panoptic contest on Code4rena.

Lesson Summary:

  • Entry point for UniswapV4 is the `unlock` function(call unlock and it callbacks you)
  • NonZeroDeltaCount must be 0 after every UniV4 pool swap
  • UniV4 callback implementation should always check if the msg.sender is the pool
  • UniV4 delta could be positive or negative - depends if you send funds to UniV4 or UniV4 sends funds to you
  • sync needs to be called before settles in UniV4
  • Transfer `delta` to the UniV4 pool first, then you .mint 1-1 the delta you transferred
  • Check if .symbol can revert before going to the catch(like in Sukukfi)
  • Check how uniV4 delta works - when's the delta negative/positive(on send or on receive)? Negative - Pool manager is owed tokens, positive - user is owed tokens
  • Check why aren't they calling `sync` in one of the branches in `unlockCallback` - ОК
  • Check if tokens with Reentrancy are in-scope
  • What happens if the delta is type(int256).min and I negate it?

Subscribe
Previous
Mentorship Series #20
Next
Mentorship Series #22
 Return to site
Cookie Use
We use cookies to improve browsing experience, security, and data collection. By accepting, you agree to the use of cookies for advertising and analytics. You can change your cookie settings at any time. Learn More
Accept all
Settings
Decline All
Cookie Settings
Necessary Cookies
These cookies enable core functionality such as security, network management, and accessibility. These cookies can’t be switched off.
Analytics Cookies
These cookies help us better understand how visitors interact with our website and help us discover errors.
Preferences Cookies
These cookies allow the website to remember choices you've made to provide enhanced functionality and personalization.
Save