PoolTogether TwabRewards contest - certora's results

A protocol for no loss prize savings on Ethereum

General Information

Platform: Code4rena

Start Date: 09/12/2021

Pot Size: $25,000 USDC

Total HM: 12

Participants: 25

Period: 4 days

Judge: LSDan

Total Solo HM: 4

Id: 64

League: ETH

PoolTogether

Findings Distribution

Researcher Performance

Rank: 6/25

Findings: 4

Award: $1,067.54

🌟 Selected for report: 2

🚀 Solo Findings: 0

Findings Information

🌟 Selected for report: WatchPug

Also found by: certora, kenzo

Labels

bug
duplicate
2 (Med Risk)

Awards

227.0919 USDC - $227.09

External Links

Handle

certora

Vulnerability details

cancelPromotion might fail unexpectedly. cancelPromotion calls _getRemainingRewards which calls _getCurrentEpochId:

function _getCurrentEpochId(Promotion memory _promotion) internal view returns (uint256) { // elapsedTimestamp / epochDurationTimestamp return (block.timestamp - _promotion.startTimestamp) / _promotion.epochDuration; }

If block.timestamp < _promotion.startTimestamp, it will revert due to underflow.

Impact

A promotion cannot be canceled before it started.

check in _getRemainingRewards if the promotion started yet, if it didn't then return the entire amount.

#0 - PierrickGT

2021-12-13T17:53:51Z

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