# Uniswap V4 mechanics: unlock callbacks, the sign of a delta, and sync before settle

Mentorship Series #21 · 15 January 2026 · [@0xfirefist](https://x.com/0xFireFist) · Panoptic · Code4rena

Mentorship Series · [The Contest Academy](https://0xsimao.com/the-contest-academy) · 0xSimao

---

We continued the Panoptic [contest](https://code4rena.com/audits/2025-12-panoptic-next-core) 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?

https://youtu.be/5P9rlQnwtH0

Session video: https://youtu.be/5P9rlQnwtH0

---

Newer: [Downcasts that silently truncate, and gaming which branch accrueInterest takes](https://0xsimao.com/the-contest-academy/mentorship-series-22) · Older: [Clone-pattern immutable args: reading a calldata offset and shifting to the bytes you want](https://0xsimao.com/the-contest-academy/mentorship-series-20)
