Cowboy Cloud and Cowboy Chain. This CIP specifies the Cowboy protocol. Cowboy Cloud runs on this protocol today. Cowboy Chain, a public network on the same protocol, is under consideration for a future release. Where the two differ, this CIP says so.
Background
CIP-9 (Runner Storage / CBFS) defines storage rent, relay rewards, Proof-of-Retrievability (PoR) challenges and slashing, and labels their CBY valuesTBD. Concrete values are needed for four things:
- Relay operators need them to run capacity-planning math before mainnet.
- CBY-denominated rent drifts against USD/GB/yr storage prices. That drift has to be observable, monitored, and adjustable by Tier-0 governance (CIP-12’s lowest governance tier) on a documented cadence.
- Challengers need an economic incentive that keeps Proof-of-Retrievability honest in steady state.
- The worst-case Relay-side loss in a slashing event needs a bound.
Goal
This CIP pins concrete CBY values for every parameter that CIP-9 labelsTBD. It also:
- adds a new
RELAY_CHALLENGE_BONDfield; - states the existing 10 / 1 / 89 platform-account credit / challenge-pool / Relay revenue split in normative text;
- defines the pro-rata weighting formula that distributes the 89% Relay share across active Relay Nodes.
Specification
1. Storage fee rate
ceil(volume_size_bytes / 2^20) MiB. Per 1 GiB of stored data per year: 2,905 nano-CBY × 1,024 MiB × 365 epochs ≈ 1.086 CBY / GiB / year.
Backblaze B2 lists **$6.95 per decimal TB per month**, which is $7.64 / TiB / month. Comparing against the per-TB figure would understate the multiple. Against the per-TiB price, the rate is 1.82× B2, and roughly 40% below S3 Standard (~$24 / TiB / month).
The rate is denominated in nano-CBY (10^-9 CBY). The USD figures in this CIP apply the administered CBY rate defined in CIP-36 §6.6 to this constant. CIP-36 §6.6 is that rate’s only definition, and this section does not restate it. At the current administered rate the fee is $0.163 / GiB / year. If the administered rate moves, the Tier-0 review below retunes this constant to keep the fee inside the target band.
The rate is set per MiB because the smallest integer per-byte rate (1 nano-CBY/byte/epoch) is ≈ 391.9 CBY / GiB / year. That is ≈ $58.78 at the administered rate, roughly 650× commodity object storage, so no per-byte rate can be competitive.
Tier-0 governance can change the rate, which is stored at 0x09 under key cip31.cbfs.storage_fee_per_mib_per_epoch. The governance value is authoritative wherever it is set. The constant above is only the genesis default, and an implementation that bills from a compiled-in constant instead of the governed parameter is non-conforming. The Tier-0 review cadence is 30 days after TGE (the token generation event) and 90 days in steady state. The target band is [$0.05, $0.50] / GiB / year. The rate is in nano-CBY and the band is in USD, so token-price movement moves the fee relative to the band. The administered rate (CIP-36 §6.6) fixes the conversion between reviews, and the Tier-0 review retunes the constant when the fee leaves the band.
2. Transfer fee rate
66,700 nano-CBY × 100 = 0.00667 CBY of transfer principal at this rate. Channel lifecycle gas is charged separately. All transfer principal goes to the fixed serving Relay, with no burn and no challenge-pool share.
The transfer rate is Tier-0 under key cip31.cbfs.transfer_fee_per_mib.
2.1 Funded-channel charging and budget scope
CIP-9 §10.4.1 defines a funded cumulative read channel, available from genesis. This parameter supplies the channel’s execution-time rater. It gives a relay
no authority to debit an arbitrary reader or volume pool. One direct payer
transaction funds a fixed channel. Each later payer-signed cumulative ACK
authorizes a bounded claim against that channel’s remaining principal only.
The unit counter is sum(ceil(logical_shard_bytes / 2^20)) over complete,
independently verified logical shards. It rounds each logical shard up
separately. It does not round a concatenated object’s bytes, and it does not sum
over transport chunks. At each checkpoint:
3. Minimum storage balance
A volume’s floor is its minimum storage balance:floor_rate_per_mib_epoch and floor_epochs in the volume’s StorageCommitment, copied from that segment’s fee snapshot (storage_fee_per_mib_per_epoch and min_storage_balance_epochs). CreateVolume records them from its admission config. A governance change therefore moves a volume’s floor at its next settlement boundary and never within an epoch. Arithmetic is checked: an overflow is invalid state and never saturates. Zero bytes give a zero floor.
This is the only rent floor. Settlement enters STORAGE_GRACE_EPOCHS when escrow plus account reserve falls below it (CIP-9 §10.3). The check run when a write grows a volume, volume withdraw and escrow-paid writes all test against this floor, never against the live governance rate.
The floor is formula-derived. The multiplier 1 (one epoch) is Tier-0-tunable via cip31.cbfs.min_storage_balance_epochs.
4. Fee distribution split (10 / 1 / 89)
For each epochly storage-fee batch collected from an account:
The implementation uses these constants:
STORAGE_FEE_PLATFORM_BPS = 1000(10%)STORAGE_FEE_CHALLENGE_POOL_BPS = 100(1%)STORAGE_FEE_RELAY_BPS = 8900(89%)- The three shares sum to 10000:
STORAGE_FEE_PLATFORM_BPS + STORAGE_FEE_CHALLENGE_POOL_BPS + STORAGE_FEE_RELAY_BPS == 10000
cip31.cbfs.fee_split; the invariant MUST hold after any proposal. Governance evaluates the complete post-update tuple,
including unchanged members, and rejects an invalid proposal before writing any
member. It enacts a valid tuple atomically. Settlement also checks the
invariant: a corrupt stored tuple selects the complete compiled default tuple
for that settlement, never a mixture of independently defaulted shares.
Storage and transfer fees are both collected in CBY (§1, §2), and this split applies only to storage rent. Transfer principal has no 10% share.
The share is credited to the Platform Fee Account, system actor 0x18, and the parameter is cip31.cbfs.fee_split.platform_bps. It is a platform share in the marketplace sense: the owner pays, relays do the work, and the platform takes a cut. It is not called a treasury share because treasury elsewhere in Cowboy denotes the protocol treasury, which has a different owner and a different purpose.
The share is credited because a burn is irreversible. A credited share can be burned later from the account, and a burned one cannot be recovered. The credit also keeps an on-chain record of accrued platform revenue, which a burn would destroy.
The address is fixed and governance cannot set it, so no governance write can redirect the share, and settlement needs no per-block state read to find it. The account’s withdrawal authority is defined at genesis. 0x18 sits in the keyless reserved system range, so it needs an explicit genesis-configured owner or multisig because it has no recoverable key. v1 defines accrual here, and the exit path is defined before mainnet genesis. Where a CBY sink is wanted, it is a buy-and-burn performed from that account, outside settlement and outside consensus.
This applies only to fees. Slashed Relay stake (§8) is denominated in CBY, and its 10% share is still burned. The stake is a token position with no dollar claim, so burning its share stays consistent.
5. Relay pro-rata weight formula
counted_icontains the unique(shard_id, shard_index)pairs Relayiserved with a counted valid PoR response in the prior epoch. Each eligible pair contributes once, including when it appears through multiple volume aliases.age_pcomes from that pair’s per-index assignment inside the stripe’s rent history row (CIP-9 §11.1). Each time a stripe is added to the native inventory starts a new incarnation of it. The row’s stripe-widegenerationis the inventory incarnation event sequence (RasStripeRow.added_at_event_seq), the sequence number of that add event, and each index has its own(node_id, chunk_root, assigned_at_block, closed_at_block, origin). For settlement epochepoch, age isepoch - floor(assigned_at_block / storage_epoch_blocks). An assignment starting at or after the cutoffepoch × storage_epoch_blocks, or closed before that cutoff, contributes zero.MAX_SHARD_AGE_FOR_WEIGHTING = 90epochs (~3 months at 1-day epochs) caps each pair’s age separately. Assignment time MUST never be backdated per index: the first valid PoR for one index cannot start another index’s clock.FirstValidPorreads inventory evidence from the stripe row, and proof keys and counted keys remain per index. The cap prevents a permanent first-mover advantage.
ras:rent:v1:assignment: row: one ras:rent:v1:history: row holds each stripe incarnation’s evidence. Other rent keys, including rrp:, rrw: and rrf:, keep their formats. The rent-evidence RPC keeps its JSON shape and its assignment_generation field name, whose value identifies the inventory incarnation event sequence (CIP-9 §11.1). Commit Cells cover all state growth, plus full rewrites of rows sized by the transaction inputs, including rent history, funding and deferred rows. Only the in-place remainder of StorageCommitment, the global stage index and existing PoR rows stays under the base charge. These execution charges are separate from storage rent. CIP-43 §5.5 specifies the bounds.
Each counted proof adds its pair’s capped age to the relay and bucket totals. The shorthand shard_count_i × shard_age_in_epochs_i applies only when all counted pairs have the same capped age.
Weighting by shard count alone rewards Relays that load shards fast and never repair. Weighting by age alone rewards Relays that keep a few old shards and take on no new storage. Summing the capped ages rewards Relays that take on real storage and keep it healthy over time. The 90-epoch cap is a Tier-0 parameter.
The formula is compiled into rent settlement and has no governance key, so changing its structure is a code change. Tier-0 may change only MAX_SHARD_AGE_FOR_WEIGHTING.
In the regenesis ruleset, settlement holds funds as follows. Epoch 0 has no prior proof
epoch and is ineligible for relay rewards. A nonzero relay share funds the
prospective payout liability only for a single-epoch settlement
(from_epoch + 1 == epoch) with a representable prior proof epoch. Multi-epoch
catch-up uses the Relay Registry destination and does not invent proof
evidence. Platform shares accrue as an internal pending liability until an
actual native credit to 0x18 is possible. The storage charge records these as
relay_payout_escrow and platform_pending. Later cbfs.rent.payout and
cbfs.platform.payout records describe actual transfers. Pooled funds and
pending liabilities are not operator income before payout.
The first funding of an epoch binds that bucket’s
MAX_SHARD_AGE_FOR_WEIGHTING. Later sources for the same epoch use the bound
value, including deferred funding collected during a Relay Registry pause. A
mid-epoch governance change does not reprice accumulated proof weights, and it
does not cause a later source to be rejected merely because its captured cap
differs. Source uniqueness, epoch identity, checked arithmetic and
paid <= funded remain mandatory.
Each rent proof, payee, deferred funding source
and platform release executes under its own savepoint, so a rollback undoes only that item. The same isolation
covers rent-producing volume settlement, relay status snapshots, expired
manifest-stage GC, volume-event pruning and pending challenge-pool credits in
the epoch sweep (EpochSweep, the system pass that runs after transactions in a block and settles storage epochs). Each kind of sweep work (storage settlement, relay housekeeping, rent, native GC and so on) is called a family. Budget exhaustion or storage capacity exhaustion rolls back
the item and leaves it for a later block.
Deterministic errors in committed item data include malformed encoding, invalid
identities, inconsistent liabilities and arithmetic overflow. Such an error
rolls back all tentative credits, fees and cursors, then quarantines the
unit the error belongs to, and processing continues with unrelated units. A quarantined unit keeps its records, and automatic processing no longer touches it. For rent
proofs and payees, that unit is the entire epoch bucket. Any failed proof or
payee leaves its beneficiary set incomplete, so the epoch allows no further
proof processing or payout. The bucket unit includes the proof index, proof,
assignment history, prior-epoch relay and volume eligibility snapshots, and
bucket payee ledgers. A malformed shared history or eligibility row can
therefore quarantine each referencing bucket, including buckets from different
epochs. We accept that amplification because the evidence remains intact and
each affected bucket retains its liabilities for recovery. Buckets that do not
reference the bad evidence can still progress. Genuine node-local storage, I/O
or backend faults remain local execution failures; they MUST NOT produce
consensus quarantine.
A quarantine record has a versioned reason, source actor/key and block height.
Original payloads, epoch-bucket bytes and settlement context are retained under
distinct keys. A failed quarantine publication preserves the original work and
stops that family for the block. Consumed work remains charged, and quarantine
itself uses the existing per-block work and item allowances. A
cbfs.rent.quarantine attribution record has zero amount and describes no
transfer or burn.
A quarantined epoch retains its funded/paid ledger and proof/payee records, is
marked quarantined, and cannot receive new funding or re-enter the payout
queue. Newly collected funding owed to that epoch is deferred under Governance,
so the paying volume can advance its settlement. The deferred entry may itself
be quarantined. Its amount is retained, never redirected or collected twice. A
deferred source keeps its replay identity. Quarantined platform and
challenge-pool pending liabilities are retained separately from new
collections. Quarantined volume/profile, stage-GC and event items keep their
primary records, and a frozen marker excludes them from later automatic sweeps.
Frozen event pruning does not advance the event-pruned high-water mark or
freeze the volume economics.
For malformed primary volume JSON, the storage family skips that volume and
advances without publishing quarantine or a frozen marker. The relay family
does the same for malformed primary profile JSON. These skips do not apply to
the native GC family. Later epochs read and skip those malformed rows again.
The permanent exclusion above applies only after an attributable item failure
publishes quarantine. All retained liabilities stay held by the chain; quarantine
neither pays nor forgives them. There is no automatic recovery. A separately
reviewed governance or manual recovery mechanism is follow-up work outside this
ruleset.
Malformed committed control records (boundary state, stage snapshot, volume
count and snapshot pages) stall only their family for that block, preserving
its work for retry. They MUST NOT halt the block, be quarantined, or authorize
manufacturing an item or cursor. The same rule applies to malformed shared
epoch funding buckets, pool balances, global queue tails or policy rows
encountered during an item: such a fault MUST NOT freeze the otherwise healthy
selected item. A repaired shared or control row lets the family resume.
The storage control record’s captured fee split MUST be validated before any
volume is selected, and an invalid split is a shared control fault. A stage
snapshot that disagrees with a decoded primary header likewise stalls before
mutation. Uploaded ordinal range checks use the primary header. Per-volume
funding identities and volume eligibility rows are owned by that volume. An
undecodable rent queue entry cannot identify its bucket, so quarantine
publication MUST roll back and preserve the queue entry. Malformed recipient
vesting defers a relay stake refund with its stake and maturity marker intact,
and other profiles continue. Shared pending pool-credit reads MUST distinguish
absent (zero) from malformed (error), preserving malformed bytes until repair.
At each storage boundary, the target epoch and its fee policy MUST be durably
captured in the keyed pending record before fallible cursor, queue or membership
setup. That saved record is the boundary’s capture. Setup rollback retains that capture. Later non-boundary blocks retry from
the original capture, including after repair of an active cursor or pending-range
header; they MUST NOT recapture current fees or merge storage epochs into one settlement. The
range header is reconciled from the ordered captures with bounded reads.
Relay housekeeping keeps its existing rule of folding pending targets into the latest one and
publishes the pending target before active-cursor setup. A boundary
publication replaces even a malformed relay pending row with the latest target.
Malformed pending state on a non-boundary block stalls the relay family.
Replacing malformed pending state emits a warning with family, height and
failure class. Boundary publication itself is block-critical: any failure
propagates and the block does not commit. Governance is exempt from actor
key-count and byte quotas, and these bounded capture records fit the per-row
bounds. Infrastructure faults still propagate.
Every manifest commit is charged for each retained boundary capture, so a
backlog of captures eventually makes commits exceed their access budget. The
backlog a commit can absorb before it fails, measured in storage epochs, is the
manifest-commit stall fuse. Structural units are CIP-43 Access-meter units before
the live scalar is applied. Each queued snapshot costs one structural read and,
when it funds an eligible rent source, another 7 reads plus 4 writes:
up to 12 structural units per queued epoch. The current ordinary-System transaction ceiling is 1,507 charged accesses;
at the maximum governed scalar (1,350,358 ppm), its structural capacity is
1,116.
Stage admission uses that maximum-scalar capacity even at lower live scalars.
Sweep setup, transaction-local deposit/manifest settlement, and Stage admission
MUST use the same bounded keyed-capture discovery independently of the active
cursor and range header. An absent or stale range header cannot hide captures.
Consumers process each captured policy in epoch order. Transaction discovery
MUST fail with the existing deterministic InvalidData error if the discovered
range does not reach the current epoch or the captured policy/order is invalid.
Settlement also fails if an intermediate record is missing; transactions MUST
NOT substitute live fees for captured work. A transaction failure rolls back
fund movements. RPC estimates execute the same transaction path. The live-fee
fallback is permitted only when no remaining captured epoch is bypassed.
EpochSweep runs after transactions. At the boundary block
H = E × storage_epoch_blocks, a transaction with no captured backlog may
therefore settle epoch E using the live fee policy before E’s capture exists.
Its first eligible funding binds the rent bucket’s age_cap to that live
policy. This is an explicit exception to captured-policy settlement. If a
governance fee-policy change executes later in the same boundary block, the
post-transaction capture can differ from the policy that transaction already
used. Without such a change, the two policies agree. The phase order is
unchanged. If older captures remain unconsumed at the boundary, their range
ends before E, and the transaction is refused until the sweep can consume
them. This refusal can occur in one boundary block per epoch.
Current Stage funding uses the source-derived auth-v3 reservation, including
pending-epoch and native-route context, and the public cap is 290
(CIP-43 current staged-manifest funding).
Historical stall-fuse audit
The following worked example retains an earlier rent-inclusive audit. At that earlier parameterization the structural capacity is 1,114; its cap, costs and pending-epoch thresholds below are historical. At the then-public maximum of 292 stage chunks and 64 relay deltas (empty shard sets), the conservative worst-case cost is 1,113, including the worst-case owner auto top-up quote; one pending epoch therefore already prevents admission. The seven additional fixed discovery units comprise a bounded prefix Scan(1) and at most one latest-boundary point read, reserved before dispatch. The worst-case staged commit has 3 stage chunks, 17 relay deltas, and 95 width-6 added stripes (570 refs), with no removals:H=3,D=17,A=570,R=0,Ac=95,Rc=0 costs 1,114 structural units before pending
rows. It cannot admit another chunk with even one pending epoch. If already staged,
with an unsettled active epoch and every pending epoch funding rent, Finalize
uses a fixed reservation of 1,114 − 11 = 1,103 and reserves 1,103 + 12*K
units for K contiguous pending epochs ending at the current epoch: the latest
queued snapshot already covers the current epoch, removing the separate
11-unit live-fallback funding term. Thus K=1 needs 1,115 units and fails at
the maximum scalar: the fuse is one storage epoch, 86,400 blocks at the production storage_epoch_blocks, measured
from an active stalled epoch to the next unconsumed boundary. At scalar 1.0,
the capacity is 1,504; that already-staged shape fits through 33 pending epochs and fails at 34
(2,937,600 blocks); new stage admission still fails at the first pending epoch.
For a fixed reservation B and eligible-source cost 12 per pending row, the
first failing count is floor((capacity - B) / 12) + 1. Cheaper shapes or
already-settled volumes can fit longer, but every commit still reserves each
pending snapshot read. This is loss of commit liveness while the family is
stalled, not permission to cap, drop or coalesce boundary captures. Repair and
recovery tooling remain follow-up work.
Current stall handling
Each stall emits a log that does not affect consensus state, with family, height and failure class, and increments that family’s per-block stats counter. Consecutive height-tagged stall records make repeated stalls observable without adding consensus state. A quarantined rent epoch has an incomplete beneficiary set, so the inclusion of unvisited proofs is unknown. They are not reported as excluded.Native inventory GC fault isolation
Native inventory GC uses the same deterministic fault isolation as the epoch sweep. Before attributing a queue visit, both its sequence and volume identity MUST decode. An undecodable queue row rolls back the visit and stalls native GC without freezing a volume. A queue row with no volume-owned member also rolls back and stalls, because its shared bytes alone cannot implicate an otherwise healthy volume. Native cleanup resumes after repair or removal. A decoded queue alias whose member verifies a different canonical queue row also stalls without freezing that healthy volume. A malformed member, commitment, native ordinal, primary or revision, or volume-owned event frontier MUST roll back the visit and quarantine that volume’s native cleanup. An absent authoritative commitment during drain also quarantines the volume, preserving absent-primary evidence. After a successful owned-fault quarantine, healthy queue items may continue. An unattributable row (including a short key, verified alias or missing member) blocks the native family head-of-line. The cursor is restored, healthy rows behind it wait, and the stall persists until repair or removal. The quarantine kind isnative_inventory_gc. Its bounded rrq: record,
rrqv: raw commitment, optional rrqc: context, native-only rrxn: freeze and
continuation cursor publish in one savepoint, with a zero-amount
cbfs.rent.quarantine Attribution event. The record digest uses a distinct
native-GC domain so it cannot collide with a storage-volume quarantine at the
same height. Native freeze MUST NOT suppress storage settlement, event pruning
or any other family for that volume. Original native/member rows remain
available for a separately reviewed recovery rule. Publication failure retains
the original item and cursor.
On enqueue of an unfrozen volume, a decoded member whose back-referenced queue
row is absent MUST be treated as stale, regardless of its cause. The storage
item deletes that member and re-enqueues the volume at tail+1 through the
occupied-slot check. A successful repair is logged and causes neither
quarantine nor a storage-family stall. This includes a collision partner that
the earlier reserved native lane has just drained and retired. The storage
savepoint restores the member if the repair cannot complete. When the
referenced row is present, a verified other occupant still causes an
unattributed stall, and an unverified mismatch remains an owned fault.
Malformed shared native cursor or directory/control data stalls the family
that owns the operation, with logs and stats and no quarantine. Cursor decoding
is inside the native-family isolation boundary, so storage, relay and rent
still run that block. Enqueue runs inside the storage sweep. Three faults there
retain the storage cursor and pause storage settlement chain-wide until repair:
- corruption of the shared queue tail;
- an occupied next queue slot;
- a member mismatch naming another volume whose own member verifies that sequence.
QuotaExceeded, including for top-ups meant to restore the balance. An owner cannot rely on
topping up while storage settlement remains stalled, and a top-up cannot repair
shared GC queue/control corruption. A separate pending-enqueue protocol would
remove that coupling and remains follow-up work. Budget/capacity exhaustion
rolls back or defers work; infrastructure faults propagate.
All added freeze/validation reads and quarantine writes are charged within the
existing 1,000-unit, 32-item EpochSweep/System allowance. Each native item
reserves 128 work units plus the existing 24-unit quarantine headroom. No new
transaction access row, client mirror, structured error code or ruleset
revision is introduced. The Governance key-inventory follow-up includes
rrxn: and the native kind alongside the existing rrq: families.
Frozen queue/member rows impose O(K) scanning overhead for K frozen volumes.
A frozen visit consumes 8 units without draining native rows, so 32 frozen
visits consume 256 units of the shared 32-item block allowance. A reserved lane
does not guarantee useful progress through these retained rows. Each frozen
volume retains a PoR-directory slot (with zero sampling weight). Accumulated
freezes can exhaust the global 10,000-entry cap and prevent new volume
creation. Bounding the accumulated frozen population and providing reviewed
recovery tooling remain follow-up work.
6. Minimum relay stake
0x0B). The stake is sized against a professional Relay’s expected revenue. Rent is billed on stored bytes, the erasure-expanded used_bytes that relays hold. A Relay holding ~100 TiB of shards (backing ~67 TiB of logical data at K + M = 4 + 2) earns 104,857,600 MiB × 2,905 nano-CBY × 30 epochs × 0.89 ≈ 8,133 CBY / month from the 89% pro-rata share. The stake is high enough to deter spam and low enough to admit professional operators.
At 33,000 CBY the stake is 4.06 months of that revenue. The stake was 5,000 CBY when the storage fee was calibrated at CBY = $1. Repricing the fee for the administered rate preserved relay revenue in USD. The stake is a fixed CBY quantity, so it was resized by the same factor. RELAY_CHALLENGE_BOND, CHALLENGER_BOUNTY and the three penalty parameters were scaled by the same 6.6x, preserving their nominal ratios to stake. POR_CHALLENGE_FEE is the one exception: 1 to 7 is 7x, because 6.6 is not an integer, and rounding down to 6 would have made the fee cheaper in real terms than it was. The current PoR settlement path charges only the eviction penalty on a confirmed third consecutive miss. It does not charge the single-miss or invalid-proof penalty parameters (§8).
The stake is Tier-0 under key cip31.cbfs.min_relay_stake.
7. Relay challenge bond
IssuePorChallenge { volume_id, shard_id, shard_index, byte_offset, byte_length }. CIP-9 §5.6 defines the challenge lifecycle, and this CIP pins its governed bond, fee and bounty amounts. The bond and the per-challenger and per-relay challenge limits make repeated speculative challenges costly.
The amounts labelled CBY in this
section are whole-token economic values. Balances, escrow, the challenge pool,
its reserve, epoch cap and paid-this-epoch counter use nano-CBY base units:
1 CBY = 1_000_000_000 base units. Convert whole-CBY bond, fee, bounty and slash
values with checked arithmetic before any debit, subtraction, min or pool
comparison. Storage-fee contributions are already in base units and MUST NOT be
scaled again. The intended 66/7/33 CBY bond/fee/bounty are therefore
66,000,000,000 / 7,000,000,000 / 33,000,000,000 base units.
The current implementation does not yet apply that conversion
consistently. The PoR handlers still use the 66/7/33 challenge constants as raw
base units, while stake and eviction penalties are converted to base units.
This is an existing gap in PoR economics.
Slashing MUST remain disabled until the challenge-side values and governance
inputs use one explicit scale and exact-delta tests cover bond, fee, bounty,
slash, pool reserve and epoch cap together. Chain-observable assignment
and relay consent are additional mandatory prerequisites;
a create-time relay list alone must not confer slashable liability. The enablement path MUST reject
activation until those prerequisites are enforced. The current enablement flag
check only compares the stored value to 1 and does not enforce these
prerequisites. No deployed guard meets this requirement yet. There is one unit
decoder.
Bond release computes
released = min(challenge.bond, escrow_balance), debits exactly that amount,
and retains fee = min(configured_fee, released) only for fee-retaining
outcomes. refund = released - fee. Void and confirmed-slash outcomes set fee
to zero. Thus refund + fee == released even when governance raises the fee
above an outstanding bond. Every “bond less fee” below uses this clamp.
A challenge’s bond moves as follows:
- The bond is escrowed at
0x0Buntil a valid response, or until expiry settlement afterPOR_RESPONSE_WINDOW = 50plusPOR_RESPONSE_GRACE = 20blocks. CIP-9 §5.6 defines the inclusive response boundary and the exclusive settlement boundary. - A valid response within the window or grace returns the bond less
POR_CHALLENGE_FEE = 7 CBY, which the challenge pool retains. An invalid response transaction is rejected. It does not resolve the challenge, and it does not by itself cause a slash or bounty. - An unanswered challenge after the window and grace emits a miss alarm and returns the bond less
POR_CHALLENGE_FEE. With slashing disabled, the per-shard consecutive-miss count does not advance. With slashing enabled, a miss advances that count, and a valid response resets it. A first or second consecutive miss does not slash stake or pay a bounty. - On the third consecutive miss with slashing enabled, the Relay is disabled and
RELAY_EVICTION_PENALTYis slashed up to its available stake (§8). The challenger receives the full bond and may receiveCHALLENGER_BOUNTY = 33 CBYfrom the challenge pool. The paid bounty ismin(CHALLENGER_BOUNTY, available_pool, epoch_cap_remaining), whereavailable_pool = max(pool_balance − effective_reserve, 0)after crediting the slash’s pool share andepoch_cap_remaining = max(POR_BOUNTY_EPOCH_CAP − paid_this_epoch, 0).POR_BOUNTY_EPOCH_CAP(Tier-0,cip31.cbfs.por_bounty_epoch_cap, default unbounded) limits total bounties per rent epoch. The current implementation defaultscip31.cbfs.por_pool_reserveto zero. Before enabling slashing, settlement MUST useeffective_reserve = max(configured_pool_reserve, next_fire_max_cost)as required by CIP-9 §5.6, recomputed at payout using the scheduled timer limits and applicable prices. The current handler subtracts only the configured reserve, and implementing the timer floor is part of the same release requirement. A pool below the floor pays no bounty. The bond refund is independent of pool balance. - If the challenged shard incarnation is removed or replaced, or the volume reaches terminal
GARBAGE_COLLECTINGbefore an unanswered challenge settles, settlement voids the challenge. Settlement returns the full bond and releases the open slot, with no fee, miss alarm, slash or bounty. ReversibleDELETEDstatus does not void a challenge.
cip31.cbfs.relay_challenge_bond. POR_CHALLENGE_FEE and CHALLENGER_BOUNTY are sub-keys, both Tier-0.
8. Slashing schedule
The three governed penalty values referenced by CIP-9 §14 are:RELAY_EVICTION_PENALTY, capped by its actual stake. A rejected invalid proof leaves the challenge open for a valid response or expiry and does not charge POR_FRAUD_PENALTY. POR_MISS_PENALTY and POR_FRAUD_PENALTY remain governed values, and this settlement path does not apply them. A void under §7 does not advance the miss count.
Slashed Relay CBY uses the same three-way proportions as storage fees: 10%, 1% to the challenge pool, and 89% pro-rata to the other Relays. The slashed Relay is excluded from the pro-rata distribution that epoch. The 10% is handled differently. Slashed stake is a CBY position, so its 10% is burned, which fits CIP-3’s deflationary design, and the 89% goes to the other Relays. The 10% of storage fees, which are nano-CBY, is credited to the Platform Fee Account 0x18 (§4).
All three penalties are Tier-0, under keys cip31.cbfs.por_miss_penalty, cip31.cbfs.por_fraud_penalty, cip31.cbfs.relay_eviction_penalty.
9. Challenge resolution timing
PoR response verification resolves a valid challenge when the response transaction executes. An invalid response transaction is rejected and leaves the challenge open. An unanswered challenge may be settled only afterPOR_RESPONSE_WINDOW plus the congestion grace; §7 gives the settlement rules. The 75-block runner-result dispute window does not delay or reverse this PoR path, and no EvidenceInvalidityAppeal is implemented for it.
10. Parameter storage at 0x09 governance
The governed parameters above are stored at the Governance system actor (0x09) in the CIP-12 centralized governance-parameter store, under logical paths cip31.cbfs.<name> (full key system:gov:param:cip31.cbfs.<name>). The Storage Manager (0x0A, CIP-9 §11.1) reads rent parameters for rent-epoch settlement and reads the transfer rate at channel checkpoint execution. This CIP does not create payer channel terms or operational gas/lifetime budgets as governance defaults.
These are governance parameters. The challenge-pool balance, escrowed challenge bonds and per-epoch counters are runtime state, stored separately at the Relay Registry system actor (0x0B) under ras:* keys (see §4 and §7). In this CIP the 0x0B address refers only to that escrow, pool and bond state, never to the parameters.
max_shard_age_for_weighting MUST be in
1..=65535. Zero would give every proof zero weight and strand funded epoch
liabilities. The first funding source for an epoch captures the age cap, so
restoring the live parameter does not repair an already-stranded bucket.
The two epoch-count parameters min_storage_balance_epochs and
auto_top_up_default_target_epochs MUST be in 0..=65535, matching their
u16 domains in §10. Zero remains a valid policy: no storage floor or no
extra top-up target, respectively. The seven monetary u64 parameters in
§11 MUST be in 0..=u64::MAX, matching their spec types. A larger value would
otherwise silently select a compiled default. Zero prices or thresholds
remain economic choices.
transfer_fee_per_mib MUST also be in 0..=u64::MAX. Both completed-transfer
and read-channel settlement parse the stored rate as u64. A larger value would
make every settlement refuse until governance restored a representable rate.
This is a structural representation bound, and zero is still accepted as a
free-transfer policy. Checked charge arithmetic can separately refuse an
unrepresentable charge without wrapping or substituting a rate.
The storage rate has a pre-existing admission discrepancy.
storage_fee_per_mib_per_epoch is specified as u64 in §10, but the current
scalar validator and rent-config loader accept u128. Storage epoch quotes
use saturating u128 multiplication and escrow funding uses checked u128
multiplication, unlike transfer settlement’s u64 rate parsers. This CIP keeps
the storage rate’s existing admission behavior and does not widen the
normative type above. Resolving that discrepancy is a separate decision.
The three fee-split shares and the cip31.cbfs.fee_split.burn_bps alias are
refused as scalar governance proposals, because SetCip31FeeSplit keeps the
joint sum-to-10000 invariant. Genesis overrides accept each share only as a
decimal in 0..=10000, including the alias. Genesis does not yet validate the
effective cross-parameter sum, so an individually valid but non-summing
override can still make settlement use the compiled split. That is a
pre-existing limitation that needs a separate joint-validation policy. These
per-value bounds add no settlement-loader clamp and no recovery rule for
historical buckets.
11. Genesis-defaults summary table
Rationale
CIP-31 is separate from CIP-9 so that each can change on its own. CIP-9 owns the data plane (shards, manifests, erasure coding, PoR mechanics). CIP-31 owns the economic parameters (rates, splits, bonds, slashing magnitudes). Keeping them apart lets governance change economic parameters (Tier-0 / Tier-2) without reopening the data-plane spec. CIP-3 and WP §13 split mechanism and parameter values the same way. The storage rate is anchored to commodity object storage. Backblaze B2 ($6.95 per decimal TB / month = $7.64 / TiB / month ≈ $0.0896 / GiB / yr) is the reference floor, because it is what a Relay operator would pay to resell hosted storage. S3 Standard (~$0.28 / GiB / yr) is the ceiling users would otherwise pay for hot, durable storage. Rent is billed per stored byte and a Relay keeps 89% of it, so its break-even fee per stored TiB is ≈ 1.12× its underlying storage cost. That is roughly $23–46 / TiB / yr self-hosted on commodity hardware, and ~$103 / TiB / yr reselling B2. The chosen rate (~$167 / stored TiB / yr, ≈ 1.82× B2) covers a self-hosted Relay about 3.6–7× over and leaves margin for a Relay backed by B2. It also prices the PoR, stake and slashing risk that centralized providers do not bear. A user stores `(K + M) / K` bytes per logical byte, so at `4 + 2` the price per logical GiB is 1.5 × $0.163 ≈ $0.245 / GiB / yr, which still undercuts S3. The rate buys read-immediately storage with verifiable retrievability, without SLA-grade replication. The transfer rate matches B2's over-allowance egress price ($0.01 per decimal GB).RELAY_CHALLENGE_BOND = 66 CBY locks challenger capital while a response is pending. A valid response or unconfirmed miss costs the challenger 7 CBY, and a void returns the full bond. A full bond refund and a pool-bounded bounty require a confirmed third consecutive miss with slashing enabled. A single induced miss therefore yields no fixed +26 CBY profit.
Security considerations
- Challenge griefing is bounded. The 66 CBY bond locks capital for each open challenge, and a valid response or unconfirmed miss retains the 7 CBY fee. A rejected invalid proof creates no bounty. Only a confirmed third consecutive miss with slashing enabled can pay a pool-bounded bounty, and per-relay open-challenge and per-challenger epoch limits also bound issuance. A void caused by chain-state changes refunds the full bond without a fee.
- The storage rate is a Tier-0 parameter, so a single proposal could spike rent 10× in one epoch. The 30/90-day review cadence in §1 is documentation only. The protocol-level guardrails are CIP-12’s Tier-0 timelock (3 days) and the per-epoch grace period (
STORAGE_GRACE_EPOCHS= 1 storage epoch =storage_epoch_blocks, 86,400 blocks ≈ 24 h on production genesis), which lets evicted volumes recover. - Pro-rata gaming is limited. The per-index age sum (§5) counts only pairs with valid PoR responses. Shard index
iof every stripe goes to the volume’srelay_nodes[i], which the owner names at creation or the chain auto-assigns from the active-relay list (CIP-9 §5.3), and the 90-epoch cap prevents permanent capture. - The 10/1/89 split for slashed Relay stake (§8) sends 89% to the other Relays. It keeps the deflationary 10% burn and gives healthy Relays an economic incentive to call out misbehaving peers. It gives no incentive to frame innocent peers, because the bounty comes from the 1% challenge pool and the 89% pro-rata share pays no bounty.
Backwards compatibility
Existing rent, split, bond and slashing parameters remain separate from the funded-channel extension. Old kind-27 read tickets/completions and signatures MUST NOT be reinterpreted as cumulative ACKs; capabilities, domains, records and replay state remain distinct. In the regenesis ruleset, signed completed-read settlement, funded read channels and rent rewards are available from genesis. Nodes retain the pricing capability keys and publishactivation_height: 0, active: true, and the read-transfer and read-channel /chain-info height fields publish 0. Operator paid-read and settlement services remain opt-in. The rent/challenge parameters originally named here are either:
- a TBD row in CIP-9 §14 being filled in with a concrete value (10 of 13 rows), or
- a renaming / explicit-bps version of the schema already present (
STORAGE_FEE_BURN_RATE10% becomesSTORAGE_FEE_PLATFORM_BPS = 1000;POR_CHALLENGE_FEE_SHAREbecomesSTORAGE_FEE_CHALLENGE_POOL_BPS = 100), or - a brand-new field (
RELAY_CHALLENGE_BOND,POR_CHALLENGE_FEE,CHALLENGER_BOUNTY,MAX_SHARD_AGE_FOR_WEIGHTING) that supplements CIP-9’s mechanism without replacing it.