# Design of BufferBinaryPool allows LPs to game option expiry

BufferBinaryPool's short lockup lets LPs withdraw before ITM option expiry or deposit just before OTM expiry, gaming payouts at other LPs' expense.

- Payout: Contest reward
- Severity: high
- Program: Buffer
- Credited: __141345__
- Disclosed: 2022-11-11
- Write-up quality: 6/10
- Original: https://github.com/sherlock-audit/2022-11-buffer-judging/issues/82
- Library page: https://bugbountylibrary.com/r/sherlock%3A2022-11-buffer%3AH-2
- Tags: domain:web3 impact:funds-loss kind:contest platform:sherlock sev:high tech:evm tech:solidity technique:source-review vuln:accounting-error vuln:business-logic

**Target:** BufferBinaryPool.sol LP deposit/withdraw share accounting
**Root cause:** LP shares can be minted and redeemed with only a trivial lockupPeriod (~10 min), so LPs can time deposits/withdrawals around public option expiries and prices to avoid losses or capture payouts risk-free.
**Steps:**
1. Observe public option price and expiration in BufferBinaryOptions.
2. If option likely to expire ITM, LP calls withdraw to redeem shares for underlying before expiry, avoiding the payout loss.
3. If option likely to expire OTM, LP deposits capital into BufferBinaryPool just before expiry to capture the premium payout.
4. After 10-minute lockupPeriod, LP withdraws immediately, bearing near-zero risk.
**How found:** Code reading of BufferBinaryPool deposit/withdraw logic combined with the observation that option price and expiry are public and lockupPeriod is trivially short, enabling timing arbitrage against other LPs.
**Exploitation:** LP monitors public option parameters; races to withdraw shares before ITM expiry to dodge losses, or deposits right before OTM expiry to collect premium, then withdraws after the short lockup. Remaining LPs absorb the losses.
**Insight:** In LP-pool option protocols, check whether deposit/withdraw lockup windows are shorter than option durations and whether option parameters are public — that combination lets LPs front-run expiry outcomes and socialize losses.
