Yieldy contest - PwnedNoMore'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: 37/99

Findings: 3

Award: $152.65

🌟 Selected for report: 0

🚀 Solo Findings: 0

Findings Information

🌟 Selected for report: BowTiedWardens

Also found by: PwnedNoMore, TrungOre, hansfriese, hubble, minhquanym, shung

Labels

bug
duplicate
2 (Med Risk)

Awards

72.4441 USDC - $72.44

External Links

Lines of code

https://github.com/code-423n4/2022-06-yieldy/blob/524f3b83522125fb7d4677fa7a7e5ba5a2c0fe67/src/contracts/Yieldy.sol#L121 https://github.com/code-423n4/2022-06-yieldy/blob/524f3b83522125fb7d4677fa7a7e5ba5a2c0fe67/src/contracts/Yieldy.sol#L122

Vulnerability details

Description

It can be medium or high according to the off-chain logic (which is not avaiable for the contest).

Specifically, rebases can only be updated by function _storeRebase and the only callsite of function _storeRebase is in function rebase.

While we have

_totalSupply = updatedTotalSupply; _storeRebase(updatedTotalSupply, _profit, _epoch);

There is always _totalSupply == updatedTotalSupply == _previousCirculatingl, reasulting totalStakedBefore == increaseAllowance

Suggested Fix

Maybe the correct logic should be first calling _storeRebase and then updating _totalSupply.

#0 - toshiSat

2022-06-27T22:25:28Z

duplicate #221

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