# ETHCrowdfundBase.sol#processContribution - Impossible to finalize crowdfund because of minContribution check

ETHCrowdfundBase's minContribution check after refund makes it impossible to reach minTotalContributions, permanently DoSing crowdfund finalization.

- Payout: Contest reward
- Severity: medium
- Program: PartyDAO
- Credited: TresDelinquentes
- Disclosed: 2024-01-10
- Write-up quality: 6/10
- Original: https://github.com/code-423n4/2023-10-party-findings/issues/127
- Library page: https://bugbountylibrary.com/r/c4%3A2023-10-party%3AM-06
- Tags: domain:web3 impact:dos impact:funds-loss kind:contest platform:code4rena sev:medium technique:source-review vuln:business-logic vuln:dos

**Target:** ETHCrowdfundBase.sol processContribution
**Root cause:** The minContribution check is applied after refunding excess contribution, so when minContribution > maxTotalContribution - minTotalContribution, any contribution that would reach the cap is refunded below minContribution and reverts.
**Steps:**
1. Deploy crowdfund with minContribution=2e18, minTotalContribution=9e18, maxTotalContribution=10e18.
2. Contribute 8.5e18 ETH, leaving 0.5e18 to minTotal and 1.5e18 to maxTotal.
3. Attempt to contribute 1e18: reverts because amount < minContribution.
4. Attempt to contribute 2e18: refunds 0.5e18, amount becomes 1.5e18 < minContribution, reverts.
5. Host calls finalize(): reverts because minTotalContribution not reached.
6. Crowdfund stuck until expiry; users can only refund after Lost.
**How found:** Code reading of the minContribution check comment and reasoning about the refund logic when minContribution exceeds the difference between max and min total contributions.
**Exploitation:** A malicious user can set up the state by contributing to leave a gap smaller than minContribution, then no further contributions can succeed, preventing finalization and locking funds until expiry.
**Insight:** When a minimum per-contribution check is applied after a refund, ensure the refunded amount cannot fall below the minimum; test edge cases where minContribution > maxTotal - minTotal.
