Backd Tokenomics contest - codexploder's results

Maximize the power of your assets and start earning yield

General Information

Platform: Code4rena

Start Date: 27/05/2022

Pot Size: $75,000 USDC

Total HM: 20

Participants: 58

Period: 7 days

Judge: GalloDaSballo

Total Solo HM: 15

Id: 131

League: ETH

Backd

Findings Distribution

Researcher Performance

Rank: 48/58

Findings: 1

Award: $119.82

🌟 Selected for report: 0

πŸš€ Solo Findings: 0

Awards

119.8232 USDC - $119.82

Labels

bug
disagree with severity
QA (Quality Assurance)
sponsor confirmed

External Links

Lines of code

https://github.com/code-423n4/2022-05-backd/blob/main/protocol/contracts/tokenomics/AmmGauge.sol#L103

Vulnerability details

Impact

Staking is not stopped even when Gauge is killed. User will not be getting any reward for the staked asset.

Proof of Concept

  1. Assume the AMMGauge is killed using kill function (AmmGauge.sol#L49). This sets killed as true

  2. poolCheckpoint will not further increase ammStakedIntegral and would simply return false

function poolCheckpoint() public virtual override returns (bool) { if (killed) { return false; } ... }
  1. User calls stakeFor function and is still able to stake amount.

  2. The drawback will be no rewards as poolCheckpoint will only return false and will not update ammStakedIntegral

Add below check in stakeFor function, restricting deposit if Gauge is killed

require(!killed, "Gauge killed");

#0 - GalloDaSballo

2022-06-19T21:17:28Z

Dup of #147

AuditHub

A portfolio for auditors, a security profile for protocols, a hub for web3 security.

Built bymalatrax Β© 2024

Auditors

Browse

Contests

Browse

Get in touch

ContactTwitter