Skip to content
Business logic Audit finding Beginner

Wrong proposalThreshold amount in LybraGovernance.sol

The governance contract's proposal threshold was set to 100,000 esLBR instead of the documented 10,000,000 esLBR. An attacker with only 100,000 esLBR delegated could create proposals, bypassing the intended requirement.

devival Follow

Originally disclosed on Code4rena

Submitted by devival

The proposal can be created with only 100_000 esLBR delegated instead of 10_000_000.

Proof of Concept

According to LybraV2Docs, a proposal can only be created if the sender has at least 10 million esLBR tokens delegated to their address to meet the proposal threshold.

In LybraGovernance.sol#L172-L174, the proposal threshold is set to only 1e23 which equals to 100_000 as esLBR has 18 decimals.

    function proposalThreshold() public pure override returns (uint256) {
        return 1e23;
    }

Tools Used

Manual Review

Recommended Mitigation Steps

In LybraGovernance.sol#L173 replace 1e23 with 1e25

Alternatively, the team can update the documentation stating that it is only required 100_000 esLBR tokens (0.1% of the total LBR supply) delegated to meet the proposal threshold.

Assessed type

Math

LybraFinance confirmed


The original report as published on Code4rena, by devival. Images and videos are our own copies; raw HTML is shown as text. View it on Code4rena.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely a typo in the threshold constant: 1e23 was used instead of 1e25, making the threshold 100 times smaller than intended.

What the attacker needed

100,000 esLBR delegated

The fix

The threshold should be changed from 1e23 to 1e25, or the documentation should be updated to reflect the lower requirement.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

In many blockchain projects, a governance contract lets token holders create proposals. To prevent spam, a minimum number of tokens (the proposal threshold) must be held or delegated. Here, the code set that minimum too low, so someone with far fewer tokens than intended could still create proposals.

What is Business logic?

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.

More from Lybra Finance

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Business logic flaws

The lesson behind this report.

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.