Hunt prep
Before you test Lybra Finance
What 31 disclosed reports say about Lybra Finance: what was found and paid, what was fixed, and where it may be worth looking next.
- with a public bounty
- 0
- median public bounty
- –
- highest public bounty
- –
Gaps worth testing
Not written yet for this program. The numbers below are up to date.
What was found and what it paid
Public bounties only; many reports disclose without the amount.
| Class | Reports | Paid | Median | Highest | In all |
|---|---|---|---|---|---|
| Business logic lesson | 23 | 0 | – | – | $0 |
| Smart contracts lesson | 3 | 0 | – | – | $0 |
| Access control lesson | 2 | 0 | – | – | $0 |
| DoS lesson | 1 | 0 | – | – | $0 |
| Misconfiguration lesson | 1 | 0 | – | – | $0 |
What was fixed
All reportsThe newest fixes, in our words. A fixed bug is not worth re-reporting, but a sibling feature, an older API version or a regression may be.
-
Incorrectly implemented modifiers in LybraConfigurator.sol allow any address to call functions that are supposed to be restricted
The modifiers should wrap the governance role check in a require statement so the call reverts when the caller lacks the role.
Disclosed
-
Making _totalSupply and _totalShares imbalance significantly by providing fake income leads to stealing fund
The _repay function should return the amount of burned shares, and that amount should be used in subsequent calculations in liquidation, superLiquidation, and rigidRedemption; also, excessIncomeDistribution should include a check for zero shares in the else branch.
Disclosed
-
Wrong proposalThreshold amount in LybraGovernance.sol
The threshold should be changed from 1e23 to 1e25, or the documentation should be updated to reflect the lower requirement.
Disclosed
-
Allowing refreshReward() to fail during minting or buring esLBR could result in gain or loss previously earned reward
The refreshReward() function should be a mandatory action inside either the mint() or burn() functions, and the try-catch statement should be removed.
Disclosed
-
The EUSDMiningIncentives contract is incorrectly implemented and can allow for more than the intended amount of rewards to be minted
The totalStaked function should be changed to sum the total supply of EUSD and of every PeUSD vault in the pools array.
Disclosed
-
Rewards for initial period can be lost in all of the synthetix derivative contracts
The start and end time of the reward cycle should be set when the first participant joins (i.e., when total supply is greater than zero) instead of in notifyRewardAmount.
Disclosed
-
No check for Individual mint amount surpassing 10% when the circulation reaches 10_000_000 in mint() of LybraEUSDVaultBase contract
The mint function should be modified to revert if the mint amount exceeds 10% of the total circulation when circulation is at least 10,000,000.
Disclosed
-
Volatile prices and lack of checks on rigidRedemption() can cause users to purchase stETH at unwanted prices
The function should be fixed by adding a minimum amount received parameter and a require check to enforce slippage protection.
Disclosed
-
Fixed reward percentage for liquidators in the eUSD vault may cause a liquidation crisis
The reward percentage should be adjusted dynamically when a position's collateral ratio is below 110%, rather than using a fixed 10% reward.
Disclosed
-
Understatement of poolTotalPeUSDCirculation amounts due to incorrect accounting after function _repay is called
The accounting should be corrected so that poolTotalPeUSDCirculation is reduced by amount minus totalFee rather than by the full amount.
Disclosed
-
It is possible to manipulate WETH/LBR pair to claim reward of the users which shouldn’t be claimed
The contract should use the pair's getReserves() values instead of quoting token balances directly with balanceOf.
Disclosed
-
Lack of timelock on rigidRedemption , enables to steal yield from other users
The same timelock logic applied to withdraw should also be applied to rigidRedemption to make this interaction unprofitable.
Disclosed
-
CLOCK_MODE() will not work properly for Arbitrum or Optimism due to block.number
It should be fixed by using block.timestamp instead of block.number for timing.
Disclosed
-
_voteSucceeded() returns true when againstVotes > forVotes and vice versa
The comparison should be reversed so that supportVotes[0] (for) is compared as greater than supportVotes[1] (against).
Disclosed
-
Liquidation won’t work when bad and safe collateral ratio are set to default values
The code should use the getter functions getSafeCollateralRatio and getBadCollateralRatio everywhere instead of reading the raw variables, so defaults are applied.
Disclosed