v4-periphery
v4-periphery copied to clipboard
[Bug]: access modifier should be internal for _rebalance in the FullRange example (security related)
Describe the bug
https://github.com/Uniswap/v4-periphery/blob/581d96dfd8b281cafe351205bf6d2d65efb4df90/contracts/hooks/examples/FullRange.sol#L317
is public
Expected Behavior
should be internal
To Reproduce
No response
Additional context
No response
the function starts with _ and hence looks like an internal function. However, the developer put it external because rebalance can happen in more cases and may need be triggerable directly for external caller. it seems that the developer hasn't fully handled this, so he put it as public first. (that's how I feel).
We also discussed that. I believe they first made it internal and then decided to make it public but forgot to update the name.
Hi! thanks for flagging -- going to close this issue because:
-
hook examples no longer live in the main branch
-
custom accounting will allow for a more v2-style curve with v2 interfaces. reference implementation https://github.com/hensha256/v2-on-v4