Steadefi

Steadefi
DeFiHardhatFoundryOracle
35,000 USDC
View results
Submission Details
Severity: low
Valid

Setters' events not emitting old variable data

Summary

Setter functions emit events but do not emit the state variable old value

GMXVault::updateTreasury

https://github.com/Cyfrin/2023-10-SteadeFi/blob/0f909e2f0917cb9ad02986f631d622376510abec/contracts/strategy/gmx/GMXVault.sol#L575-L578

GMXVault::updateSwapRouter

https://github.com/Cyfrin/2023-10-SteadeFi/blob/0f909e2f0917cb9ad02986f631d622376510abec/contracts/strategy/gmx/GMXVault.sol#L585-L588

GMXVault::updateTrove

https://github.com/Cyfrin/2023-10-SteadeFi/blob/0f909e2f0917cb9ad02986f631d622376510abec/contracts/strategy/gmx/GMXVault.sol#L595-L598

GMXVault::updateCallback

https://github.com/Cyfrin/2023-10-SteadeFi/blob/0f909e2f0917cb9ad02986f631d622376510abec/contracts/strategy/gmx/GMXVault.sol#L605-L608

GMXVault::updateFeePerSecond

https://github.com/Cyfrin/2023-10-SteadeFi/blob/0f909e2f0917cb9ad02986f631d622376510abec/contracts/strategy/gmx/GMXVault.sol#L615-L618

GMXVault::updateParameterLimits

https://github.com/Cyfrin/2023-10-SteadeFi/blob/0f909e2f0917cb9ad02986f631d622376510abec/contracts/strategy/gmx/GMXVault.sol#L629-L649

GMXVault::updateMinSlippage

https://github.com/Cyfrin/2023-10-SteadeFi/blob/0f909e2f0917cb9ad02986f631d622376510abec/contracts/strategy/gmx/GMXVault.sol#L656-L659

GMXVault::updateMinExecutionFee

https://github.com/Cyfrin/2023-10-SteadeFi/blob/0f909e2f0917cb9ad02986f631d622376510abec/contracts/strategy/gmx/GMXVault.sol#L666-L669

Impact

Not emitting the old value when reassigning a state variable can lead to critical data being missed by the user, frontend, or Ethereum monitoring systems.

Tools Used

Manual

Recommendations

Consider emit the old and the new value of a state variable.

Updates

Lead Judging Commences

hans Lead Judge almost 2 years ago
Submission Judgement Published
Validated
Assigned finding tags:

Insufficient event emission

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.