Popcorn contest - ayeslick's results

A multi-chain regenerative yield-optimizing protocol.

General Information

Platform: Code4rena

Start Date: 31/01/2023

Pot Size: $90,500 USDC

Total HM: 47

Participants: 169

Period: 7 days

Judge: LSDan

Total Solo HM: 9

Id: 211

League: ETH

Popcorn

Findings Distribution

Researcher Performance

Rank: 91/169

Findings: 2

Award: $62.44

🌟 Selected for report: 0

🚀 Solo Findings: 0

Findings Information

🌟 Selected for report: immeas

Also found by: 0xBeirao, Nyx, ayeslick, chaduke, eccentricexit, fyvgsk

Labels

bug
2 (Med Risk)
partial-50
sponsor confirmed
duplicate-785

Awards

44.0481 USDC - $44.05

External Links

Lines of code

https://github.com/code-423n4/2023-01-popcorn//blob/main/src/vault/Vault.sol#L629

Vulnerability details

Impact

A creator can propose an adapter or fees with the standard quitPeriod then after a day has passed the creator can call change setQuitPeriod to change quitPeriod to 1 day. The creator can then call changeAdapter or changeFees updating the adapter or fees before the expected date.

Proof of Concept

quitPeriod == 5 days

Creator proposes a new adapter or fees

After a day creator calls setQuitPeriod setting quitPeriod to 1 day from 5 days

Admin calls changeAdapter or changeFees immediately changing the adapter or fees 4 days early.

Prevent the creator from changing rageQuit until the currently proposed change is complete

#0 - c4-judge

2023-02-16T06:36:03Z

dmvt marked the issue as duplicate of #363

#1 - c4-sponsor

2023-02-18T12:06:19Z

RedVeil marked the issue as sponsor confirmed

#2 - c4-judge

2023-02-23T22:55:38Z

dmvt marked the issue as partial-50

Findings Information

Labels

bug
2 (Med Risk)
partial-50
sponsor confirmed
duplicate-78

Awards

18.3909 USDC - $18.39

External Links

Lines of code

https://github.com/code-423n4/2023-01-popcorn//blob/main/src/vault/Vault.sol#L541

Vulnerability details

Impact

proposedFees and proposedFeeTime are initially set to their default values. They can be set by the creator of the vault through the vault controller. When a vault is deployed it can be deployed with a fee already set. Once these values are set and the quitPeriod has passed anyone can call the changeFees function. If someone calls changeFee before the creator calls proposeFees via the vault controller for the first time, fees will be set to proposedFees which is 0. proposedFeeTime is 0 so the check on line 541, if (block.timestamp < proposedFeeTime + quitPeriod), is bypassed.

Proof of Concept

creator deploys vault with fees set to 5% an operator calls changeFee check on line 541 is bypassed because block.timestamp is greater than quitPeriod fees is set to 0

If proposedFeeTime == 0 revert();

#0 - c4-judge

2023-02-16T08:09:18Z

dmvt marked the issue as duplicate of #78

#1 - c4-sponsor

2023-02-18T12:16:38Z

RedVeil marked the issue as sponsor confirmed

#2 - c4-judge

2023-02-23T00:55:03Z

dmvt marked the issue as partial-50

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