# PostTxProcessing can revert user transactions not interacting with Turnstile

Canto CSR PostTxProcessing hook returns errors that revert any user transaction, even ones not touching Turnstile, when fee distribution rounds to zero.

- Payout: Contest reward
- Severity: medium
- Program: Canto
- Credited: Jeiwan
- Disclosed: 2023-03-31
- Write-up quality: 6/10
- Original: https://github.com/code-423n4/2022-11-canto-findings/issues/94
- Library page: https://bugbountylibrary.com/r/c4%3A2022-11-canto%3AM-02
- Tags: domain:web3 impact:dos kind:contest platform:code4rena sev:medium tech:evm tech:go tech:solidity technique:source-review vuln:accounting-error vuln:dos

**Target:** Cosmos SDK EVM post-tx hook (x/csr keeper evm_hooks.go) and Turnstile.sol
**Root cause:** PostTxProcessing returns errors from CSR storage reads, fee sends, Turnstile address lookup, and distributeFees; ethermint reverts the whole tx on any hook error. Zero-fee distribution (rounding) triggers a revert in distributeFees.
**Steps:**
1. Submit any EVM tx on Canto with low gas usage such that CSR fee share rounds to 0
2. PostTxProcessing computes fees = gasUsed * share, yielding 0
3. distributeFees(0) reverts in Turnstile.sol#L149
4. Hook returns error; state_transition.go reverts entire tx with ErrPostTxProcessing
**How found:** Code review of the CSR EVM hook: noticed PostTxProcessing propagates errors and that ethermint reverts the whole tx on hook error; traced fee computation to find rounding-to-zero path into distributeFees revert.
**Exploitation:** Any user (or attacker griefing) submits a low-gas transaction; the CSR hook's zero-fee distributeFees call reverts, causing the whole transaction to fail even though it never interacted with Turnstile.
**Insight:** In Cosmos-EVM post-tx hooks, any returned error reverts the user's tx globally; audit fee-share math for rounding-to-zero paths that make downstream calls revert, and check whether hooks swallow vs propagate errors.
