# Modifying the loan term setting can default existing loans

Particle LAMM liquidation check reads live LOAN_TERM, so admins lowering the term can liquidate existing positions created under longer terms.

- Payout: Contest reward
- Severity: medium
- Program: Particle Protocol
- Credited: adriro
- Disclosed: 2024-01-26
- Write-up quality: 6/10
- Original: https://github.com/code-423n4/2023-12-particle-findings/issues/52
- Library page: https://bugbountylibrary.com/r/c4%3A2023-12-particle%3AM-05
- Tags: domain:web3 impact:funds-loss kind:contest platform:code4rena sev:medium tech:evm tech:solidity technique:source-review vuln:business-logic vuln:liquidation

**Target:** ParticlePositionManager liquidation logic (Solidity LAMM)
**Root cause:** Liquidation condition uses the current global LOAN_TERM instead of the term in effect when the lien was created, so a governance change retroactively shortens existing loans.
**Steps:**
1. Create a position with LOAN_TERM = 2 weeks.
2. LP owner calls `reclaimLiquidity()` to stop renewals.
3. Admin calls `updateLoanTerm()` to set LOAN_TERM = 1 week.
4. After 1 week, `lien.startTime + LOAN_TERM < block.timestamp` holds and the position becomes liquidatable.
**How found:** Code reading of the liquidation condition in ParticlePositionManager, noticing it references the mutable global LOAN_TERM rather than a per-lien value.
**Exploitation:** Admin/governance lowers LOAN_TERM; any lien whose LP stopped renewals becomes liquidatable earlier than the borrower agreed, enabling liquidation of positions intended for a longer term.
**Insight:** When a liquidation/expiry check reads a mutable global config, ask whether changing that config retroactively alters the terms of already-open positions; per-position snapshots of time/term parameters are the safe pattern.
