Skip to content

Commit ed854f2

Browse files
werner-stacksgitbook-bot
authored andcommitted
GITBOOK: Protocol Bonds: add Getting Allowlisted for a Bond
1 parent c5c3750 commit ed854f2

3 files changed

Lines changed: 51 additions & 0 deletions

File tree

‎docs/operate/SUMMARY.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
* [Generate a Signer Signature](staking-stx/generate-signer-signature.md)
3535
* [Key and Address Rotation](staking-stx/key-and-address-rotation.md)
3636
* [Protocol Bonds](protocol-bonds/README.md)
37+
* [Getting Allowlisted for a Bond](protocol-bonds/getting-allowlisted-for-a-bond.md)
3738
* [Bond Pool (BTC + STX) Operator Guide](protocol-bonds/bond-pool-operator-guide.md)
3839
* [Opening a Bond Position](protocol-bonds/opening-a-bond-position.md)
3940
* [Ending or Changing a Bond Position](protocol-bonds/ending-or-changing-a-bond-position.md)

‎docs/operate/protocol-bonds/README.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ description: >-
88

99
A protocol bond pairs a Bitcoin commitment with an STX lock for a 12-cycle term. The Bitcoin side is either a timelocked UTXO you hold on Bitcoin L1, or sBTC held by the contract.
1010

11+
* [Getting Allowlisted for a Bond](getting-allowlisted-for-a-bond.md): how capacity is allocated, what to send the Stacks Endowment, and how to check your entry.
1112
* [Opening a Bond Position](opening-a-bond-position.md): the allowlist, the two Bitcoin legs, the registration deadline, and what the contract checks.
1213
* [Ending or Changing a Bond Position](ending-or-changing-a-bond-position.md): exiting early, withdrawing sBTC, changing signer-manager, and rolling into a new position.
1314
* [Bond pool operator guide](bond-pool-operator-guide.md): running a whitelisted community sBTC pool.
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
---
2+
description: >-
3+
How bond capacity is allocated during PoX-5, what to send the Stacks
4+
Endowment, and how to check your allowlist entry once the bond is set up.
5+
---
6+
7+
# Getting Allowlisted for a Bond
8+
9+
Every protocol bond registration needs an allowlist entry for that bond, on either Bitcoin leg. During PoX-5 there is no on-chain auction. The Stacks Endowment sets each bond's capacity, target yield, STX:BTC ratio and allocation off-chain, and allocates the capacity to whitelisted partners before the bond starts. About 10% of paired-bond capacity is reserved for open access, first come first served, through selected pool partners. Allocation moves on-chain in a later protocol version, PoX-6.
10+
11+
If you do not have an allocation of your own, the open-access route is a [bond pool](bond-pool-operator-guide.md).
12+
13+
## What to send the Endowment
14+
15+
For each bond, one row per staker:
16+
17+
* **Staker principal.** The Stacks address that will call `register-for-bond`.
18+
* **Maximum BTC commitment, in sats.** Your cap for this bond. You do not send an STX amount: the STX you must pair is computed at registration from the sats you actually commit and the bond's ratio.
19+
20+
Your signer-manager and how you are paid are not part of the allowlist. You choose both when you register. See [Opening a Bond Position](opening-a-bond-position.md).
21+
22+
## What the Endowment publishes
23+
24+
The Endowment's `setup-bond` call puts the bond on-chain: its target yield, the STX:BTC ratio and minimum STX ratio, the early-exit subscript, and the allowlist of up to 1,000 stakers with each one's sats cap. Registration opens once it lands.
25+
26+
* The contract accepts `setup-bond` only within the two reward cycles before the bond starts, 4,200 Bitcoin blocks on mainnet. In practice the Endowment publishes about seven days before Day 0.
27+
* It runs once per bond. The parameters and the allowlist are fixed from then on.
28+
29+
{% hint style="warning" %}
30+
**The allowlist is fixed at `setup-bond`.** If you are not on it when the bond is set up, you cannot join that bond. The next opportunity is the next bond, two reward cycles later.
31+
{% endhint %}
32+
33+
## Check your entry
34+
35+
Read the bond back and confirm it matches what you agreed with the Endowment, then read your cap. A missing entry means you are not allowlisted. Read the parameters from the chain each time rather than hardcoding them: they are set per bond.
36+
37+
```ts
38+
import { fetchBond, fetchBondAllowance } from '@stacks/bitcoin-staking';
39+
40+
const network = 'mainnet';
41+
42+
const bond = await fetchBond({ bondIndex, network });
43+
// Check targetRateBps, stxValueRatio, minUstxRatioBps and earlyUnlockBytes
44+
45+
const allowance = await fetchBondAllowance({ bondIndex, address: staker, network });
46+
if (allowance === undefined) throw new Error(`Not allowlisted for bond ${bondIndex}`);
47+
```
48+
49+
Next: [Opening a Bond Position](opening-a-bond-position.md).

0 commit comments

Comments
 (0)