# Anyone can post a request with `gasPrice` of 0 to cause SEDA chain to halt

Unvalidated zero gasPrice in posted data requests becomes a divisor in SEDA tally gas metering, causing division-by-zero panic and halting all validators.

- Payout: Audit contest
- Severity: medium
- Program: Seda Protocol
- Found by: g
- Disclosed: 2024-12-20
- Write-up quality: 6/10
- Original: https://github.com/sherlock-audit/2024-12-seda-protocol-judging/issues/235
- Library page: https://bugbountylibrary.com/r/sherlock%3A2024-12-seda-protocol%3AM-10
- Tags: area:web3 domain:web3 impact:dos kind:contest platform:sherlock sev:medium tech:go tech:solidity technique:source-review vuln:dos

**Target:** SEDA chain Core contract post_request and Tally module gas_meter
**Root cause:** post_request.rs does not validate gasPrice is non-zero; tally gas_meter.go divides proxy fee by gasMeter.GasPrice(), so zero causes division-by-zero panic in Endblock.
**Steps:**
1. Post a valid data request via Core contract with `gasPrice=0`, `replicationFactor=1`, and no filters.
2. Request gets commit-revealed by a validator and enters Tallying status.
3. Tally module Endblock() processes it; no filters means no filtering errors.
4. Gas metering executes `proxyConfig.Fee.Amount.Quo(gasMeter.GasPrice())` with zero divisor, panicking the node.
5. All validators process the same request and crash, halting the chain.
**How found:** Code review of the post_request validation path and the tally gas metering divisor, noticing gasPrice is user-controlled and used as a divisor without a non-zero check.
**Exploitation:** Attacker submits a single crafted data request with zero gasPrice; once commit-revealed, every validator's Tally Endblock panics on division-by-zero, halting the chain until patched.
**Insight:** When a user-supplied numeric field flows into a consensus-critical module (Endblock/tally), check every arithmetic use including divisors; a single unvalidated zero can panic all validators deterministically.

