# Add premium doesn't collect fees

Particle LAMM charges fees on margin at openPosition but not on addPremium, letting borrowers split deposits to avoid fees.

- 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/54
- Library page: https://bugbountylibrary.com/r/c4%3A2023-12-particle%3AM-04
- Tags: domain:web3 impact:funds-loss kind:contest platform:code4rena sev:medium tech:solidity technique:source-review vuln:business-logic vuln:fee-bypass

**Target:** ParticlePositionManager smart contract (LAMM)
**Root cause:** Fee calculation in openPosition applies FEE_FACTOR to marginFrom and amountFromBorrowed, but addPremium adds margin without applying any fee.
**Steps:**
1. Call `openPosition()` with minimal `marginFrom` such that `amountReceived + amountToBorrowed + marginTo >= collateralTo`, minimizing the fee base.
2. Call `addPremium()` to supply the remaining required premium without incurring fees.
3. Bundle both calls via multicall in one transaction to avoid liquidation risk.
**How found:** Code review comparing fee logic in openPosition against addPremium; noticed addPremium lacks the FEE_FACTOR application present in openPosition.
**Exploitation:** Borrower opens a position with the smallest margin that still satisfies collateral requirements, then tops up the premium via addPremium, which is fee-free. This reduces total fees paid compared to providing the full margin upfront.
**Insight:** When auditing fee mechanisms, compare all entry points that modify position margin or premium; any path that adds value without applying the same fee schedule is a candidate for fee avoidance.
