The vulnerability lies in the incorrect logging within the _setExternalBribes function. Specifically, the function emits an event called SetBribeFor using the internal_bribes[_gauge] instead of using external_bribes[_gauge] for the current external bribe address argument.
This misconfiguration in the event emission can be exploited by misleading observers of the blockchain about the actual deployment or change of external bribes. Given that blockchain transparency is fundamental for trust in the system, especially for operations involving incentive mechanisms (like bribes), this has real implications.
Attack Scenario
Assume an observer monitors external bribes being set for gauges through the SetBribeFor event for governance or audit purposes.
The contract admin sets or updates an external bribe address using the setNewBribes function.
Upon execution, _setExternalBribe is called internally, and an event SetBribeFor(false, internal_bribes[_gauge], _external, _gauge) is emitted.
Observers receive the event and, due to the erroneous emission of internal_bribes[_gauge] as the previous address, incorrectly conclude that the previous external bribe address was what is currently the internal bribe address.
Conclusion and Fix:
To correct this issue, the line in the _setExternalBribe function:
Github username: -- Twitter username: -- Submission hash (on-chain): 0x1f14e721c29e2e97b474147fbe6482d950d5b964430ba90e41465e7b2401eb9f Severity: low
Description: Description
The vulnerability lies in the incorrect logging within the
_setExternalBribes
function. Specifically, the function emits an event calledSetBribeFor
using theinternal_bribes[_gauge]
instead of usingexternal_bribes[_gauge]
for the current external bribe address argument.This misconfiguration in the event emission can be exploited by misleading observers of the blockchain about the actual deployment or change of external bribes. Given that blockchain transparency is fundamental for trust in the system, especially for operations involving incentive mechanisms (like bribes), this has real implications.
Attack Scenario
SetBribeFor
event for governance or audit purposes.setNewBribes
function._setExternalBribe
is called internally, and an eventSetBribeFor(false, internal_bribes[_gauge], _external, _gauge)
is emitted.internal_bribes[_gauge]
as the previous address, incorrectly conclude that the previous external bribe address was what is currently the internal bribe address.Conclusion and Fix:
To correct this issue, the line in the
_setExternalBribe
function:should be changed to:
Attachments
Proof of Concept (PoC) File
Revised Code File (Optional)