28910 - [SC - High] Bool check wrong in registerGauge

Submitted on Mar 1st 2024 at 17:07:59 UTC by @offside0011 for Boost | ZeroLend

Report ID: #28910

Report type: Smart Contract

Report severity: High

Target: https://github.com/zerolend/governance

Impacts:

  • Manipulation of governance voting result deviating from voted outcome and resulting in a direct change from intended effect of original results

Description

Brief/Intro

registerGauge function has a boolean value check written incorrectly, causing the pool to never be registered.

Vulnerability Details

in the function registerGauge, the if bool check is wrong,

 mapping(address => bool) public isPool; // pool => bool


if (!isPool[_asset]) {
    _pools.push(_asset);
    isPool[_asset] = true;
}

Impact Details

lead to pools will never be success registered

References

https://github.com/zerolend/governance/blob/main/contracts/voter/PoolVoter.sol#L136

Proof of concept

Last updated

Was this helpful?