# Non-normalized amounts sent via Wormhole lead to failure to redeem incentives

Unnormalized withheld OLAS amounts synced from L2 via Wormhole cause precision loss on L1, leaving dust and blocking some users from redeeming staking incentives.

- Payout: Audit contest
- Severity: medium
- Program: Olas
- Found by: EV\_om
- Disclosed: 2024-08-06
- Write-up quality: 6/10
- Original: https://github.com/code-423n4/2024-05-olas-findings/issues/26
- Library page: https://bugbountylibrary.com/r/c4%3A2024-05-olas%3AM-15
- Tags: area:web3 domain:web3 impact:funds-loss kind:contest platform:code4rena sev:medium tech:evm tech:solidity technique:incomplete-fix technique:source-review vuln:accounting-error vuln:precision-loss

**Target:** Dispenser / WormholeDepositProcessorL1 cross-chain staking incentive sync
**Root cause:** Wormhole only transfers 8-decimal precision, but syncWithheldAmount() on L1 records the raw unnormalized withheld amount from L2; subtracting it from a normalized transferAmount yields an unnormalized remainder that Wormhole truncates, creating a mismatch between L1 accounting and L2 balance.
**Steps:**
1. L2 WormholeTargetDispenserL2 withholds an unnormalized amount (e.g. 0.123456789 OLAS) due to emissions-limit difference in verifyInstanceAndGetEmissionsAmount().
2. Anyone calls `syncWithheldTokens()` on WormholeTargetDispenserL2, which encodes the unnormalized amount and sends via Wormhole.
3. `receiveWormholeMessages()` on WormholeDepositProcessorL1 forwards the unnormalized amount to `Tokenomics.syncWithheldAmount()`.
4. Dispenser stores unnormalized withheld amount in mapChainIdWithheldAmounts.
5. User claims incentives; Dispenser computes transferAmount (e.g. 0.2 OLAS) and subtracts unnormalized withheld amount -> 0.076543211 OLAS.
6. WormholeDepositProcessorL1 sends only 0.07654321 OLAS (8 decimals), keeping 0.000000001 OLAS as dust.
7. L2 dispenser holds 0.199999999 OLAS vs expected 0.2, so user cannot redeem.
**How found:** Code-reading of the comment in Dispenser.sol claiming withheld amounts are normalized; noticed syncWithheldAmount() lacks the normalization applied in syncWithheldAmountMaintenance(). Sponsor disputed, but warden traced the emissions-limit path in DefaultTargetDispenserL2 where withheld amount derives from second-granularity emission calculations, making it unnormalized.
**Exploitation:** Not an attack; a functional bug. Normal operation of syncing withheld amounts from L2 to L1 causes precision truncation, accumulating dust in WormholeDepositProcessorL1 and leaving L2 dispenser balance short of L1-calculated incentives, blocking redemption for some users.
**Insight:** When a bridge enforces fixed decimal precision, audit every path that produces amounts feeding the bridge—not just the primary transfer path. Secondary flows like withheld/refund amounts derived from time-based emission math can bypass normalization even when the main path is correct.

