Yieldy contest - PumpkingWok's results

A protocol for gaining single side yields on various tokens.

General Information

Platform: Code4rena

Start Date: 21/06/2022

Pot Size: $50,000 USDC

Total HM: 31

Participants: 99

Period: 5 days

Judges: moose-code, JasoonS, denhampreen

Total Solo HM: 17

Id: 139

League: ETH

Yieldy

Findings Distribution

Researcher Performance

Rank: 82/99

Findings: 1

Award: $53.14

🌟 Selected for report: 0

🚀 Solo Findings: 0

At every rebase() the Yieldy.sol pushes a new Rebase structure into the rebases. Within the parameters it stores the totalStakedBefore as _previousCirculation and totalStakedAfter as _totalSupply but it seems they represent the same amount. The rebase() function internally calls the _storeRebase , if the profit is > 0, passing the updatedTotalSupply as _previousCirculation (line 100) but at line 98 the same value is used to update the _totalSupply, so at time of creating and push a new Rebase, both totalStakeBefore and totalStakedAfter will be defined with the same value.

To resolve this, if the _previousCirculation needs to represent the total supply before updating it, the currentTotalSupply (line 82) can be passed as first parameter in _storeRebase() call instead of updatedTotalSupply.

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