PBJ Lava V3 security assessment, January 2026: 6 findings on a round-based LP prize contract
PBJ engaged Fidesium to assess the Lava V3 contracts, a round-based protocol that holds Uniswap V2 liquidity and distributes ETH to winners each round. The assessment ran to January 26, 2026 and covered the original contract and a revised build. The codebase scored 12/100, low risk.
The review surfaced 6 issues: 1 critical, 0 high, 2 medium, 2 low, and 1 informational. The critical finding was remediated. The remaining five are either acknowledged as accepted trade-offs or tracked as active low-probability items.
What was reviewed
| Protocol | Lava, gaming |
| Chain | Base Sepolia |
| Engaged by | PB&J |
| Deployed Contract | https://sepolia.basescan.org/address/ |
| Audited commit, initial | 0xb45ae157bedf5eae20fa0d24cb12f4e91aabdf55 |
| Audited commit, review | 0x135d7797452405358ea9d38d156603F73275B99b |
| Assessment period 01 Jan to 26 Jan 2026 | Delivered 26 Jan 2026 | Report version 2.0 |
Scope: the LP management path (checkAndExecuteRug, refillLiquidity, addLiquidity), the round accounting (totalPendingPrizes, rescueETH), the compound-interest floor update, and the Uniswap V2 router and pair interactions the protocol depends on. Both whitebox (source) and blackbox testing were in scope.
Team risk was reviewed alongside the contracts. The founding team is public, their experience is highly relevant to the protocol, and no team-side issues were found. Combined smart-contract risk score: 17.
The findings
Six findings were raised in total.
Critical
0
High
0
Medium
2
Low
2
Info
1
The single Critical finding is recorded as resolved. Two of the three High findings are recorded as resolved, and their fixes are described below. The remaining findings carry their own status in the signed report, which is linked in full at the end of this page.
Findings whose fixes are recorded and verified:
The findings
Six issues, grouped by where the risk lives:
- LP lifecycle. The protocol removes liquidity on every rug round but had no working path to refill it, so LP tokens drained geometrically (50%, 25%, 12.5%, …) until the contract permanently bricked. This is the critical finding.
- Owner authority. The
ownerhad broad modification rights over the contracts and their state. - Rescue path.
rescueETHcan be blocked if undiscovered accounting bugs causetotalPendingPrizesto deviate from the real pending payout. - Iterative math.
currentFloor = (currentFloor * (10000 + rate)) / 10000runs in a loop, so truncation drift accumulates over thousands of iterations. - Low-level
call. The contract uses rawcall, which copies arbitrary returndata to memory and leaves a returnbomb gas-grief surface. - Compound interest in a loop. The floor update iterates up to 500 periods, costing about 10,000 gas per iteration.
What was fixed, and how it was verified
The liquidity pool could deplete to zero and permanently brick the protocol
checkAndExecuteRug pulled LP out of the pool with router.removeLiquidityETH(...) every round. refillLiquidity was supposed to put it back, but it called IUniswapV2Pair(pair).sync(), which only reconciles reserves against the current token balances: it does not mint new LP tokens. The practical effect was geometric decay. Round 1 cut LP to 50%, round 2 to 25%, round 3 to 12.5%, and so on. Once lpBalance reached zero, checkAndExecuteRug() reverted on its lpBalance > 0 guard, and no code path in the contract could bring LP back: addLiquidity() was gated behind require(!tradingEnabled), and all ETH accrued to winners rather than being retained for refills. The contract would permanently brick.
The recommendation set had three parts: swap sync() for router.addLiquidityETH() in refillLiquidity, open an emergency path by removing the tradingEnabled guard on addLiquidity or adding a dedicated emergencyAddLiquidity, and introduce an ETH retention mechanism so the contract has reserves to refill with.
The team remediated by adding a manualAddLiquidity function that resolves the state before LP decay becomes terminal. The decay curve puts the brick event roughly 60 to 70 rounds in the future, which gave runway to ship the fix without forcing an emergency upgrade. The revised contract at 0x135d...B99b was re-reviewed and the critical is closed.
The remaining items
The two medium findings were handled as follows. Owner centralization is mitigated operationally: the owner key will be held by a well-managed multisig. The blockable rescueETH path is still active; the recommendation is to add a timelocked, owner-only emergency rescue that bypasses accounting checks, and PBJ has not shipped that change in this report cycle.
The two low findings were acknowledged. The iterative precision loss on the compound-interest floor will be negligible under real conditions, so the mathematical closed-form rewrite was not applied. The low-level call returnbomb has no concrete attack incentive, since a caller would only grief themselves, so the excessivelysafecall swap was not applied either.
The one informational finding, compound interest in a loop, is active. A closed-form compound-interest formula would cut gas by roughly 98% at the 500-period cap, but the computation overflows uint256 and requires chunked SafeMath-style handling plus test coverage for the small differences against sequential rounding, so it is open for future work.
How the assessment was run
The method was a mixed whitebox and blackbox review with automated tooling on top. Techniques used:
- Mapping of contract functionality and the external API surface.
- Application logic flaw review, focused on the round state machine and the LP lifecycle.
- Access-handling and authorization review on every owner-gated function.
- Brute-force analysis against bounded loops and public entry points.
- Input-handling and fuzzing across every external parameter.
- Source-code review of the pinned contracts.
- Dependency analysis against the Uniswap V2 router and pair interfaces the protocol calls into.
Team risk was scored alongside contract risk, with doxing status, prior experience, and risk summary each rated low.
The signed report
The signed PDF report (PBJ-LavaV3.html rendered to PDF) is the authoritative record of this engagement. It contains the per-finding writeups, the exact recommendation text, the Uniswap sync() listing and the contract code excerpt that made the LP decay reachable, and the actions-taken notes against each finding.
Request a quote
An audit of this depth starts with scope, and scope starts with a conversation about which parts of the codebase carry the risk. Fidesium’s manual smart contract audits are line-by-line reviews by the engineers who built the tooling, with two rounds of fix verification included, priced from $5,000 depending on the codebase.
Tell us what you are shipping and when, and we will scope it.