Assessment reports>Omni AVS>Informational findings>Precision loss in weight-calculating logic with low multipliers
Category: Business Logic

Precision loss in weight-calculating logic with low multipliers

Informational Severity
Informational Impact
N/A Likelihood

Description

A staker deposits to a strategy to receive shares for the strategy and delegate their shares to an operator. OmniAVS calculates the weight of the registered operator by multiplying the shares and the predetermined multiplier:

uint256 internal constant STRATEGY_WEIGHTING_DIVISOR = 1e18;

function _getTotalDelegations(address operator) internal view returns (uint96) {
    // ...

    for (uint256 i = 0; i < _strategyParams.length;) {
        // ...
        total += _weight(shares, params.multiplier);
        // ...
    }

    return total;
}

function _weight(uint256 shares, uint96 multiplier) internal pure returns (uint96) {
    return uint96(shares * multiplier / STRATEGY_WEIGHTING_DIVISOR);
}

Note that the multiplication of shares and multiplier is divided by STRATEGY_WEIGHTING_DIVISOR, which is 10^18. If the multiplier is too low, such as one, a significant part of precision would be lost.

Impact

If the multiplier is too low, such as one, the part of shares will be dismissed in the weight-calculation logic. For example, if L!1.9 stETH is staked, the shares for L!0.9 stETH will not be considered for calculating weight.

Recommendations

Consider refactoring the _weight function to minimize precision loss. One approach would be to perform the division operation first and then the multiplication. This approach should only be used, however, on the assumption that the shares value is larger than STRATEGY_WEIGHTING_DIVISOR. Alternatively, another option would be ensuring that only large multipliers are used (i.e., larger than STRATEGY_WEIGHTING_DIVISOR).

Remediation

Omni Network stated that they will use large multipliers, such as 10^18, for their deployments.

Zellic © 2025Back to top ↑