alderconfidential DA on Solana
Core Concepts

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).

  1. Detect missing cell: During blinded DAS sampling (POST /v1/blobs/:id/sample), if a DA node drops or refuses a cell, SampleBlobResponse.missingCells reports { row, col, expectedNode, reason }.
  2. Open challenge (`open_challenge`): Any verifier other than the node's own operator builds an unsigned v0 transaction via POST /v1/challenges/open/build and signs open_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.

  1. Node response (`respond_challenge`): Before deadline_slot (slot <= challenge.deadline_slot), the challenged operator signs respond_challenge(cell_data, merkle_proof) (POST /v1/challenges/:id/respond/build). The program enforces 1..=512 byte cell_data and exact Merkle depth for blob.n * blob.n, recomputes SHA-256("alder:cell:v1:<row>:<col>:" || cell_data), and verifies Merkle inclusion at leaf index row * blob.n + col directly against blob.commitment_root on chain. Valid openings transition the challenge to Resolved, decrement both open challenge counts, and emit ChallengeResolved.
  2. Slash on timeout (`slash_node`): Once slot > challenge.deadline_slot, any caller can submit slash_node (POST /v1/challenges/:id/slash/build). The program slashes actual_slash = min(challenge.slash_amount, node.bonded_lamports) from the node's bond PDA, increments blob.failed_challenges, and decrements both open challenge counts. While node.open_challenge_count > 0 or before node.unbond_unlock_slot, withdraw_bond is blocked; while blob.open_challenge_count > 0, close_blob is 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:

RecipientShare of actual_slashOn-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:

FieldProgram ConstraintRole
challenge_window_slots>= 10 (AlderError::InvalidWindow)Number of slots a challenged node has to call respond_challenge
slash_bps1..5000 (AlderError::InvalidSlashBps)Fraction of node.bonded_lamports slashed per missed challenge (max 50%)
min_node_bondu64 lamportsMinimum 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 Pending status past anchor_slot + config.attestation_timeout_slots, the publisher calls cancel_blob (POST /v1/blobs/:id/cancel/build). The program transitions the blob to Cancelled, sets escrowed_fee = 0, refunds the full escrowed SOL directly to publisher, and emits BlobCancelled. Calling cancel_blob earlier fails with AlderError::AttestationWindowActive (6012).
  • Expiry and rent recovery (`expire_blob`, `close_blob`, `close_challenge`): Once slot >= blob.expiry_slot, alder-keeper (or any caller) executes expire_blob on chain to transition Available to Expired, release the vested node SOL fee to DaNode.earned_fee_balance if blob.failed_challenges == 0 (or forfeit it to fee_recipient if blob.failed_challenges > 0), and decrement active shard and blob counts. Publishers can close Expired or Cancelled BlobRecord PDAs via close_blob once open_challenge_count == 0 and escrowed_fee == 0, and challengers can close Resolved or Slashed Challenge PDAs via close_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