Challenges and Slashing
Missing-cell fraud proofs, on-chain challenge windows, bond slashing splits, and timeout/expiry lifecycle paths.
Bonded DA nodes earn SOL availability fees for storing coded cells and serving sampling queries. When a node fails to serve a cell it is responsible for, any verifier can enforce availability on chain through the alder_da challenge state machine.
Challenge Lifecycle
Each challenge is stored in a deterministic Challenge PDA derived from ["challenge", blob_pda, node_pda, [row, col]] (132 bytes).
- Detect missing cell: During blinded DAS sampling (
POST /v1/blobs/:id/sample), if a DA node drops or refuses a cell,SampleBlobResponse.missingCellsreports{ row, col, expectedNode, reason }. - Open challenge (`open_challenge`): Any verifier other than the node's own operator builds an unsigned v0 transaction via
POST /v1/challenges/open/buildand signsopen_challenge(row, col). The program checks:
- blob.status == BlobStatus::Available (AlderError::BlobNotAvailable) - blob.attesting_node == node.key() (AlderError::NodeNotCustodian) - challenger.key() != node.operator (AlderError::SelfChallengeNotAllowed) - slot < blob.expiry_slot (AlderError::BlobExpired) - row < blob.n && col < blob.n (AlderError::InvalidCellCoordinate) - node is Active or Slashed with bonded_lamports > 0 (AlderError::NodeNotActive) It increments both node.open_challenge_count and blob.open_challenge_count, computes slash_amount = (node.bonded_lamports * config.slash_bps) / 10_000, sets deadline_slot = current_slot + config.challenge_window_slots, sets status = ChallengeStatus::Open, and emits ChallengeOpened.
- Node response (`respond_challenge`): Before
deadline_slot(slot <= challenge.deadline_slot), the challenged operator signsrespond_challenge(cell_data, merkle_proof)(POST /v1/challenges/:id/respond/build). The program enforces1..=512bytecell_dataand exact Merkle depth forblob.n * blob.n, recomputesSHA-256("alder:cell:v1:<row>:<col>:" || cell_data), and verifies Merkle inclusion at leaf indexrow * blob.n + coldirectly againstblob.commitment_rooton chain. Valid openings transition the challenge toResolved, decrement both open challenge counts, and emitChallengeResolved. - Slash on timeout (`slash_node`): Once
slot > challenge.deadline_slot, any caller can submitslash_node(POST /v1/challenges/:id/slash/build). The program slashesactual_slash = min(challenge.slash_amount, node.bonded_lamports)from the node's bond PDA, incrementsblob.failed_challenges, and decrements both open challenge counts. Whilenode.open_challenge_count > 0or beforenode.unbond_unlock_slot,withdraw_bondis blocked; whileblob.open_challenge_count > 0,close_blobis blocked so a publisher cannot delete a blob mid-challenge.
Slash Distribution and Node Status
When slash_node executes in backend/program/programs/alder_da/src/lib.rs:
| Recipient | Share of actual_slash | On-Chain Transfer |
|---|---|---|
Challenger (challenge.challenger) | 50% (actual_slash / 2) | Direct lamport transfer from DaNode PDA to challenger |
Protocol fee recipient (config.fee_recipient) | 50% (actual_slash - bounty) | Direct lamport transfer from DaNode PDA to ALDR launch wallet |
The program also increments node.slashed_count by 1 and checks node.bonded_lamports < config.min_node_bond. If the remaining bond falls below min_node_bond, node.status transitions from Active to Slashed. The operator can restore Active status by calling top_up_bond back up to min_node_bond.
Protocol Parameters Governing Challenges
All challenge timing and penalty parameters are stored in ProtocolConfig at init_protocol:
| Field | Program Constraint | Role |
|---|---|---|
challenge_window_slots | >= 10 (AlderError::InvalidWindow) | Number of slots a challenged node has to call respond_challenge |
slash_bps | 1..5000 (AlderError::InvalidSlashBps) | Fraction of node.bonded_lamports slashed per missed challenge (max 50%) |
min_node_bond | u64 lamports | Minimum active bond; falling below moves DaNode to Slashed |
attestation_timeout_slots | >= 10 (AlderError::InvalidWindow) | Slots after anchor_slot before an unattested blob can be cancelled |
Cancel and Expiry Paths
- Cancel (`cancel_blob`): If a blob stays in
Pendingstatus pastanchor_slot + config.attestation_timeout_slots, the publisher callscancel_blob(POST /v1/blobs/:id/cancel/build). The program transitions the blob toCancelled, setsescrowed_fee = 0, refunds the full escrowed SOL directly topublisher, and emitsBlobCancelled. Callingcancel_blobearlier fails withAlderError::AttestationWindowActive(6012). - Expiry and rent recovery (`expire_blob`, `close_blob`, `close_challenge`): Once
slot >= blob.expiry_slot,alder-keeper(or any caller) executesexpire_blobon chain to transitionAvailabletoExpired, release the vested node SOL fee toDaNode.earned_fee_balanceifblob.failed_challenges == 0(or forfeit it tofee_recipientifblob.failed_challenges > 0), and decrement active shard and blob counts. Publishers can closeExpiredorCancelledBlobRecordPDAs viaclose_blobonceopen_challenge_count == 0andescrowed_fee == 0, and challengers can closeResolvedorSlashedChallengePDAs viaclose_challenge.
Testing Challenges Locally
In localnet and development environments, the API exposes POST /v1/nodes/:operator/simulate-drop ({ "enabled": true }) to force a specific virtual DA node to drop cell queries. Sampling a blob assigned to that node then produces a real missingCells entry that you can challenge in /app/sample or via sdk.api.buildOpenChallenge.
Next Steps
- Learn how to open challenges from a light client in Run a DAS Light Client.
- Learn how node operators manage bonds and claim fees in Operate a Bonded DA Node.