# Lack of safety buffer between liquidation threshold and LTV ratio for borrowers to prevent unfair liquidations

Tapioca BigBang/Singularity reuse collateralizationRate as both max LTV and liquidation start, so max-LTV loans are instantly liquidatable and repeatedly liquidated.

- Payout: Contest reward
- Severity: high
- Program: Tapioca DAO
- Credited: peakbolt
- Disclosed: 2023-11-16
- Write-up quality: 6/10
- Original: https://github.com/code-423n4/2023-07-tapioca-findings/issues/1164
- Library page: https://bugbountylibrary.com/r/c4%3A2023-07-tapioca%3AH-22
- Tags: domain:web3 impact:funds-loss kind:contest platform:code4rena sev:high tech:solidity technique:source-review vuln:business-logic vuln:liquidation

**Target:** Lending markets (BigBang/Singularity) Market.sol solvency and liquidation logic
**Root cause:** _isSolvent() and computeClosingFactor() both use the same collateralizationRate, so liquidation begins exactly at max LTV with no safety buffer above it.
**Steps:**
1. Borrow at max LTV (e.g. 75%) via BigBang/Singularity.
2. Collateral drops slightly, LTV becomes 75.000001%.
3. computeClosingFactor() sees liquidationStartsAt at 75% and permits liquidation.
4. Liquidation leaves position still undercollateralized; bots repeat liquidations.
**How found:** Code reading of _isSolvent() and computeClosingFactor() revealed both reference the same collateralizationRate, meaning the liquidation threshold equals the LTV cap instead of exceeding it.
**Exploitation:** Liquidation bots monitor positions and liquidate the moment LTV crosses the collateralizationRate, penalizing borrowers who borrowed at max LTV and repeatedly liquidating since the position never returns to healthy.
**Insight:** When auditing lending markets, check that the liquidation threshold is a distinct variable strictly greater than the max LTV; if both derive from one rate, max-LTV positions are liquidatable at inception and post-liquidation remain unhealthy.
