Lybra Finance - zambody's results

A protocol building the first interest-bearing omnichain stablecoin backed by LSD.

General Information

Platform: Code4rena

Start Date: 23/06/2023

Pot Size: $60,500 USDC

Total HM: 31

Participants: 132

Period: 10 days

Judge: 0xean

Total Solo HM: 10

Id: 254

League: ETH

Lybra Finance

Findings Distribution

Researcher Performance

Rank: 42/132

Findings: 1

Award: $221.44

🌟 Selected for report: 0

🚀 Solo Findings: 0

Findings Information

🌟 Selected for report: T1MOH

Also found by: Iurii3, LokiThe5th, josephdara, skyge, squeaky_cactus, yjrwkk, zambody

Labels

bug
3 (High Risk)
satisfactory
upgraded by judge
duplicate-14

Awards

221.4353 USDC - $221.44

External Links

Lines of code

https://github.com/code-423n4/2023-06-lybra/blob/main/contracts/lybra/governance/LybraGovernance.sol#L60

Vulnerability details

Impact

For votes are not counted in quorum. Proposals could fail to reach quorum if a majority of the votes are for.

Proof of Concept

function _quorumReached(uint256 proposalId) internal view override returns (bool){
    return proposalData[proposalId].supportVotes[1] + proposalData[proposalId].supportVotes[2] >= quorum(proposalSnapshot(proposalId));
}

This code does not count "for" votes.

Tools Used

GitHub

Add the for votes:

function _quorumReached(uint256 proposalId) internal view override returns (bool){
    return proposalData[proposalId].supportVotes[0] + proposalData[proposalId].supportVotes[1] + proposalData[proposalId].supportVotes[2] >= quorum(proposalSnapshot(proposalId));
}

Assessed type

Error

#0 - c4-pre-sort

2023-07-04T02:23:46Z

JeffCX marked the issue as duplicate of #14

#1 - c4-judge

2023-07-28T15:33:49Z

0xean marked the issue as satisfactory

#2 - c4-judge

2023-07-28T19:42:05Z

0xean changed the severity to 3 (High Risk)

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