F-2026-0028·dead-code

Dead code in _handleWrap and _handleUnwrap

Fixedbridgecross-chainkey-registrygithub.com/pdxwebdev/yadakeyeventwallet
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
F-2026-0028

oog
zealynx

Smart Contract Security Digest

Monthly exploit breakdowns, audit checklists, and DeFi security research — straight to your inbox

© 2026 Zealynx