hiero-ledger / hiero-ledger/hiero-consensus-node
CLPR-3.4: Slashing, Penalties, and Reimbursement
- Dominant language
- Java
- Stars
- 406
- Forks
- 226
- Avg merge
- 3d 4h
- Merged PRs (30d)
- 210
Description
## Story CLPR-3.4: Slashing, Penalties, and Reimbursement
**Parent Epic:** CLPR-3: Payment & Routing Layer
**Repo:** hiero-ledger/hiero-consensus-node
### Objective
Implement bilateral slashing per cross-platform spec §4.6 and Hiero impl spec §11.7.
### Acceptance Criteria
**Destination-side (during submitBundle data message processing):**
- **AC-1:** `CONNECTOR_NOT_FOUND`: No Connector to slash. Endpoint absorbs cost. Failure response enqueued.
- **AC-2:** `CONNECTOR_UNDERFUNDED`: Slash `locked_stake` by `clpr.slashBaseAmount * (clpr.slashEscalationMultiplier ^ slash_count)`. Reimburse endpoint. Increment `slash_count`.
**Source-side (when failure Response Message arrives back):**
- **AC-3:** `CONNECTOR_NOT_FOUND` / `CONNECTOR_UNDERFUNDED`: Slash source Connector's `locked_stake`. Reimburse source-side submitting endpoint.
- **AC-4:** `SUCCESS` / `APPLICATION_ERROR` / `REDACTED`: No penalty.
**Escalation (Hiero impl spec §11.7):**
- **AC-5:** First offense: `clpr.slashBaseAmount`.
- **AC-6:** Subsequent: `previous_slash * clpr.slashEscalationMultiplier`.
- **AC-7:** After `clpr.slashBanThreshold` offenses: Connector banned, remaining stake forfeited.
- **AC-8:** Slash proceeds go to the endpoint that submitted the bundle.
- **AC-9:** If slashed amount exceeds remaining stake, all remaining stake taken.
- **AC-10:** Black-box tests: destination slash on underfunded, source slash on failure response, escalation, ban after threshold, no penalty on success/app-error/redacted, stake exhaustion, endpoint reimbursement
### Dependencies
- CLPR-3.3 (dispatch triggers slashing)
- CLPR-2.4 (responses trigger source-side slashing)
### Risk
**Medium** — Geometric escalation arithmetic.
Contributor guide
Research direction
Trace the submitBundle data-message path and the failure Response Message path, using CLPR-3.3 and CLPR-2.4 as dependency context. Map destination/source slashing, reimbursement, escalation, and ban behavior to the black-box tests; done means AC-1 through AC-10 pass, including no penalties for success, application-error, or redacted responses.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- blockchain
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100