
0xSimao Findings Database
0xSimao's public findings database aggregates smart contract audit results from many independent engagements, cataloging dozens of critical/high/medium/low severity bugs such as ERC4626 vault accounting errors, missing slippage controls, incorrect ICR/debt tracking in leveraged vault "Den" systems, cross-chain state desynchronization via LayerZero in a CDS/borrowing protocol, inflation attacks on ERC4626 shares, and DoS conditions from bad-debt checks. It covers protocols spanning leveraged vaults, lending/liquidation engines, Uniswap-based strategies, Maple/Sky/Aave yield strategies, an IDO launchpad, and a GameFi/DeFi hybrid ("Codeup"), providing concrete real-world examples of DeFi/Solidity vulnerability classes and fixes.
What it is
The 0xSimao Findings Database is a per-engagement listing of smart-contract audit findings, grouped by codebase and tagged Crit/High, Medium, Low/Info with IDs (H-1, M-2, 3S-MORE-C01, etc.). Each entry names the exact function and the failure mechanism. Beyond the protocol list in the summary, the visible portion surfaces concrete, recurring exploit primitives worth using as an audit checklist for ERC4626 vaults, leveraged/CDP systems, and cross-chain LayerZero designs.
Recurring mechanisms the page names
- Unauthenticated flash-loan callback drain:
LoopStrategy::onMoreFlashLoan()does not verify the caller is the market, letting an attacker call it directly and steal collateral (3S-MORE-C01). Paired with an unvalidatedpathinredeem/withdraw()that lets an attacker drain via mismatched buy/sell tokens (3S-MORE-C02). - ERC4626 inflation attack on share minting (3S-MORE-M02); bad-debt DoS where any function relying on
totalAssets()— including 4626 functions that must not revert — reverts once bad debt exists (L-9). - Uniswap
slot0tick misuse: main position ticks set fromslot0.tickare inaccurate near a tick border, causing wrong allocation and fund loss (H-2); negative-tick modulo errors cause active-when-should-be-inactive positions and division by zero (M-6). - Precision loss:
Vault::_calcDeposit()multiplies three 18-decimal quantities (1e54) leaving ~1e23 headroom, overflowing for low-priced tokens (M-1). - LayerZero non-atomic state overwrite: lacking a lock, cross-chain global state (
cdsPoolValue,totalCdsDepositedAmount, liquidation indices) is overwritten between chains (H-26, H-19, H-20), plus unbounded debt inflation via repeatedly callingcalculateCumulativeRate()becauselastEventTimeis never updated (H-21). - Leverage/ICR edge failures:
executeWithdrawalEpoch()DoSes at the minimum-debt limit and asserts against a never-setprevICR(M-2, M-3); increase/decrease leverage revert near debt limits (M-4, M-5). - Token-compatibility footguns: missing
safeERC20/safeApprovefor non-standard tokens;address.transfer(2300 gas) risking stuck funds on zkSync and smart-contract wallets; missingdisableInitializers().
What to do
Use the database as a targeted review checklist when auditing or shipping similar code:
- Validate
msg.senderin every flash-loan/hook callback; validate swappathendpoints. - Add slippage bounds on deposits, donations, and withdrawals (shares/amount minimums, real deadlines).
- Guard ERC4626 against inflation attacks and ensure
totalAssets()/preview functions cannot revert on bad debt. - Read TWAP, not
slot0, for pricing/allocation; handle negative-tick modulo. - For cross-chain designs, serialize/lock global-state mutations and update time/nonce trackers on every accrual.
Caveats
Only the first ~60,000 of 161,613 characters were fetched, ending mid-PoolTogether (PrizePool/TieredLiquidityDistributor). Later engagements are not shown; this is not a complete inventory. Entries are one-line descriptions without full PoC or fix diffs (some note "Addressed in <commit>"); treat them as leads, not verified reproductions.
Technologies named here
Techniques named here
- Incorrect internal accounting / balance tracking
- Oracle/price-tick manipulation via slot0
- Unbounded/unauthenticated state-changing calls
- ERC4626 share inflation attack
- Integer underflow leading to revert/DoS or loss
- Signature/parameter replay enabling manipulated swap data
- Cross-chain state desynchronization via LayerZero messaging
- Rounding errors from precision loss
- Missing SafeERC20 usage for non-standard tokens
Related in AppSec
Flowise MCP Security Bypass Enables RCE
Inside an Oracle Database SQL Injection Attack | Huntress
OASIS
