F-2026-0028·dead-code
Dead code in _handleWrap and _handleUnwrap
TL;DR
totalTransferred is passed by value, so the remainder updates inside _handleWrap and _handleUnwrap mutate a local copy that is never propagated back to _executePermits.
Severity
INFO
Impact
LOW
Likelihood
LOW
Method
MManual review
CAT.
Complexity
LOW
Exploitability
LOW
02Section · Description
Description
totalTransferred is passed by value to _handleWrap and _handleUnwrap.
The remainder code inside these functions updates a local copy that is
never propagated back to _executePermits.
03Section · Recommendation
Recommendation
Remove the remainder code from _handleWrap and _handleUnwrap. The
transferOnly remainder path at lines 331-340 already handles remainder
forwarding correctly at the _executePermits level. If partial wraps with
remainder forwarding are desired in the future, return totalTransferred
from the handlers.
04Section · Resolution
Resolution
YadaCoin, Confirmed.
Zealynx, Fixed.
Status
Fixed