Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Proof of Transfer (PoX)

PoX-5 replaced PoX-4 at Epoch 4.0, which activated at Bitcoin block 960,230. Every PoX-4 lock released at activation, and calls to .pox-4 that change state now fail. This page covers .pox-5. The PoX-4 source is kept at pox-4.clar.

The deployed contract is SP000000000000000000002Q6VF78.pox-5. The line links below point at the source pinned at release tag 4.0.4.

Contract summary

pox-5 runs Bitcoin Staking:

  • STX-only staking. A staker locks STX to a signer-manager contract for 1 to 96 reward cycles.

  • Protocol bonds. A 12-cycle position pairing locked STX with either a Bitcoin L1 timelock, proven to the contract with a Merkle proof, or sBTC held by the contract.

  • Signer registration. A signer-manager contract registers itself with a signer key whose holder has granted it that key.

  • Rewards. The contract calculates sBTC rewards once per distribution and pays them to signer-managers, which settle with their stakers.

Where a staker's rewards go is set by their signer-manager, passed as signer-calldata.

Public functions

Staking

Function
Called by
What it does
Source

stake

Staker

Starts STX-only staking through a registered signer-manager.

stake-update

Staker

Changes signer-manager, extends the lock, increases the amount, or any combination.

unstake

Staker

Moves an STX-only stake's unlock to the next reward cycle.

Protocol bonds

Function
Called by
What it does
Source

register-for-bond

Allowlisted staker

Joins a bond with STX plus either L1 lockup proofs or sBTC. Must land before the bond starts.

update-bond-registration

Bond participant

Moves an active bond to a different signer-manager.

announce-l1-early-exit

The staker, directly

Ends an L1 bond's reward share early. The STX stays locked until the bond ends.

unstake-sbtc

sBTC bond participant

Withdraws part or all of the locked sBTC.

Rewards

Function
Called by
What it does
Source

calculate-rewards

Anyone

Computes the latest distribution across active bonds and STX-only staking. Every active bond must be listed.

claim-rewards

Signer-manager

Transfers the signer's accumulated sBTC for a reward cycle and the listed bonds.

claim-staker-rewards-for-signer

Signer-manager

Settles one staker's rewards in the manager's accounting. Transfers nothing.

Signers

Function
Called by
What it does
Source

grant-signer-key

Signer-manager

Records a one-time grant, signed by the key holder, letting the manager use a signer key.

register-signer

Signer-manager

Registers the manager with a granted signer key.

revoke-signer-grant

The signer key's principal

Revokes a grant. The manager can take no new stake, and existing positions wind down.

Administration

setup-bond, set-bond-admin, set-pause-admin and pause-rewards are called by the bond and pause admins, and set-burnchain-parameters runs once at boot. Integrators do not call them.

Where to go next

Coming from PoX-4

This table maps each PoX-4 call to its PoX-5 equivalent, for apps and contracts written against .pox-4.

PoX-4
PoX-5

stack-stx

stake, to a signer-manager. Solo staking means staking to one you run.

delegate-stx, delegate-stack-stx

stake, to the pool's signer-manager. There is no delegation step.

stack-extend, stack-increase, delegate-stack-extend, delegate-stack-increase

stake-update, in one call.

revoke-delegate-stx

unstake, the closest equivalent.

stack-aggregation-commit, stack-aggregation-commit-indexed, stack-aggregation-increase

None. The signer-manager calls register-signer once.

set-signer-key-authorization

grant-signer-key, the closest equivalent.

allow-contract-caller, disallow-contract-caller

None. See below.

get-stacker-info

get-staker-info, or get-bond-membership for a bond.

No contract-caller allowance. PoX-4 let a contract stack for a user only after the user called allow-contract-caller (pox-4.clar L587-L588). PoX-5 has no such check. stake, stake-update, unstake, register-for-bond, update-bond-registration and unstake-sbtc act on tx-sender, so any contract a user calls can change that user's position. Guard those calls with staking and PoX post-conditions.

These functions do restrict the caller:

  • announce-l1-early-exit must be called by the staker directly (L1219-L1222).

  • claim-rewards and claim-staker-rewards-for-signer act on contract-caller, so a signer-manager can claim only for itself (L2392, L2449).

Last updated

Was this helpful?