syncWithheldAmount is missing the downsizing of staking incentive to the specified number of bridging decimals which can lead to potential overinflation of the witheld amount for the chainid to be synced.
Recommended Mitigation Steps
Introduce the normalizer check for bridging decimals.
if (bridgingDecimals < 18) {
uint256 normalizedAmount = amount / (10 ** (18 - bridgingDecimals));
normalizedAmount *= 10 ** (18 - bridgingDecimals);
// Downsize staking incentive to a specified number of bridging decimals
amount = normalizedAmount;
}
Judge has assessed an item in Issue #108 as 2 risk. The relevant finding follows:
7.
syncWithheldAmount
doesn't normalize the amount to sync based on bridging decimalsLinks to affected code *
https://github.com/code-423n4/2024-05-olas/blob/3ce502ec8b475885b90668e617f3983cea3ae29f/tokenomics/contracts/Dispenser.sol#L1174
Impact
syncWithheldAmount
is missing the downsizing of staking incentive to the specified number of bridging decimals which can lead to potential overinflation of the witheld amount for the chainid to be synced.Recommended Mitigation Steps
Introduce the normalizer check for bridging decimals.