Highlights
Logic Error: 2 prior fixes. Scrutinize any change in this area.
BasicAMBMediator.sol: most-fixed (1 issue). Treat as high-risk during review.
4 high-severity fixes in this history; regressions here are high-impact.
Recurring patterns
The bug types that recur here, drawn from past fixes, not open vulnerabilities.
Logic Error: A comparison using >= 0 instead of > 0 allowed unauthorized token bridging by treating a zero destination lane as valid. This is a classic off-by-one boundary error in forwarding rule evaluation.
Memory Corruption: Inline assembly using calldataload(120) to extract a receiver address was replaced with a safe Bytes.bytesToAddress function, preventing potential memory corruption and incorrect address decoding.
Business Logic: Fee-on-transfer tokens caused over-minting because the relay assumed the transferred amount matched the received amount. The fix measures actual balance change, a critical accounting check for token bridging.