# minOfferCost can be bypassed in certain scenarios

Kairos interest payout uses proportional split once above minInterestsToRepay, letting small provisions receive less than the guaranteed minimum interest.

- Payout: Contest reward
- Severity: medium
- Program: Kairos
- Credited: 0x52
- Disclosed: 2023-02-28
- Write-up quality: 6/10
- Original: https://github.com/sherlock-audit/2023-02-kairos-judging/issues/23
- Library page: https://bugbountylibrary.com/r/sherlock%3A2023-02-kairos%3AM-4
- Tags: domain:web3 impact:funds-loss kind:contest platform:sherlock sev:medium tech:solidity technique:source-review vuln:accounting-error vuln:business-logic

**Target:** ClaimFacet.sendInterests interest distribution logic
**Root cause:** When total interest exceeds minInterestsToRepay, sendInterests switches from equal-split minimum payout to proportional split by provision.amount/loan.lent, so provisions below 1/n of the loan get less than the per-position minimum.
**Steps:**
1. Set minInterestsToRepay such that per-position minimum is 1e18; loan has 2 provisions (25% and 75%), total minimum 2e18.
2. Repay loan after paid interest reaches 2.001e18 (just above minimum).
3. sendInterests takes the else branch and pays proportionally: 0.5e18 to first provision, 1.5e18 to second.
4. Observe first provision receives 0.5e18 < 1e18 guaranteed minimum, violating minOfferCost anti-spam guarantee.
**How found:** Code review of sendInterests: noticed the two branches (equal split at exactly minInterestsToRepay vs proportional split above it) create a discontinuity, and reasoned that proportional shares below 1/n fall under the per-position minimum.
**Exploitation:** Lender-side griefing/spam vector: attacker fills a loan with many tiny provisions so each falls below 1/n, then repays just above the aggregate minimum, causing small provisions to earn below the guaranteed minimum interest, defeating the anti-spam cost.
**Insight:** When a contract guarantees a minimum payout but switches formula once a threshold is crossed, check for discontinuity at the boundary: proportional splits can pay some recipients below the guaranteed floor even when the aggregate exceeds it.
