Skip to content

Commit 01f28c8

Browse files
Ethan Hurstclaude
andcommitted
docs: update README with license, anti-whale, referral, snapshot details
- Add ELv2 license badge and description - Expand anti-whale section (BPD cap, BPB tiers, loyalty multiplier) - Add referral system documentation - Expand free claim with SOL snapshot table - Add chain binding to security section - Add missing instructions (referral, pause, unpause, BPD timestamp) - Remove dead docker/README.md link (purged from repo) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 067a11c commit 01f28c8

1 file changed

Lines changed: 37 additions & 9 deletions

File tree

README.md

Lines changed: 37 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# HELIX Staking Protocol
22

3+
[![License: Elastic-2.0](https://img.shields.io/badge/License-Elastic--2.0-blue.svg)](LICENSE)
4+
35
A time-locked staking protocol on Solana inspired by HEX. Users stake HLX tokens for up to 5,555 days, earning T-shares that accumulate daily inflation. Longer and larger stakes earn bonus multipliers. A periodic Big Pay Day (BPD) event redistributes a pool to active stakers. Built with Anchor 0.32.1 and Token-2022.
46

57
**Program ID**: `E9B7BsxdPS89M66CRGGbsCzQ9LkiGv6aNsra3cNBJha7`
@@ -30,13 +32,26 @@ A time-locked staking protocol on Solana inspired by HEX. Users stake HLX tokens
3032

3133
**Longer Pays Better (LPB)** — up to 2× multiplier for stakes committed to 10 years (3,641 days). Bonus scales linearly with duration.
3234

33-
**Bigger Pays Better (BPB)** — tiered bonus for larger stake sizes with diminishing returns above 1.5B tokens to prevent whale dominance. Maximum 1.5× bonus.
35+
**Bigger Pays Better (BPB)** — tiered bonus for larger stake sizes with diminishing returns above 1.5B tokens to prevent whale dominance. Three tiers with decreasing slope. Maximum 1.5× bonus.
3436

3537
**Big Pay Day (BPD)** — periodic event that distributes a bonus pool to all active stakers proportional to their T-shares. Features:
3638
- Batched finalization to handle large staker counts on-chain
3739
- 24-hour community observation window before sealing
3840
- 5% per-stake share cap to prevent whale capture
3941
- Duration loyalty multiplier (up to 50% bonus for stakes at full term)
42+
- Admin abort capability if calculation issues arise
43+
44+
### Anti-Whale Protections
45+
46+
| Mechanism | Description |
47+
|-----------|-------------|
48+
| BPD share cap | 5% maximum of the BPD pool per individual stake |
49+
| BPB diminishing returns | Three-tier curve: linear up to 1.5B, reduced slope 1.5B–5B, further reduced 5B–10B, hard cap at 1.5× |
50+
| Duration loyalty multiplier | Rewards commitment duration, not just stake size — up to 50% BPD bonus for stakes that have served their full term |
51+
52+
### Referral System
53+
54+
Stakers can refer new participants via `create_stake_with_referral`. The referee receives a +10% T-share bonus and the referrer earns a +5% token bonus minted at stake creation. Referral records are tracked on-chain via PDA.
4055

4156
### Unstake Penalties
4257

@@ -46,9 +61,18 @@ A time-locked staking protocol on Solana inspired by HEX. Users stake HLX tokens
4661
| On-time (within 14-day grace) | None |
4762
| Late (after grace period) | 0% → 100% over 351 days |
4863

49-
### Free Claim
64+
### Free Claim (SOL Snapshot Airdrop)
5065

51-
Snapshot-based airdrop using Merkle proofs. 10,000 HLX per SOL held at snapshot. Eligible wallets must hold ≥ 0.1 SOL. Tokens vest: 10% immediate, 90% over 30 days. Speed bonuses apply: +20% in week 1, +10% in weeks 2–4. Claim window is 180 days.
66+
A snapshot of SOL balances at a specific slot determines airdrop eligibility. The authority builds a Merkle tree of eligible wallets and uploads the root on-chain via `initialize_claim_period`. Users submit a Merkle proof to claim.
67+
68+
| Parameter | Value |
69+
|-----------|-------|
70+
| Ratio | 10,000 HLX per SOL held at snapshot |
71+
| Minimum SOL | 0.1 SOL |
72+
| Vesting | 10% immediate, 90% over 30 days |
73+
| Speed bonus | +20% (week 1), +10% (weeks 2–4) |
74+
| Claim window | 180 days |
75+
| Proof verification | On-chain Merkle proof (max depth 20, supports 1M+ wallets) |
5276

5377
---
5478

@@ -72,8 +96,12 @@ Snapshot-based airdrop using Merkle proofs. 10,000 HLX per SOL held at snapshot.
7296
| `migrate_stake` | Migrate legacy stake account layout |
7397
| `transfer_authority` | Initiate two-step authority handoff |
7498
| `accept_authority` | Complete authority handoff |
99+
| `create_stake_with_referral` | Stake with referrer — referee +10% T-shares, referrer +5% tokens |
75100
| `admin_set_claim_end_slot` | Extend/close claim window |
76101
| `admin_set_slots_per_day` | Update slot calibration |
102+
| `admin_set_bpd_finalize_timestamp` | Adjust BPD seal observation window |
103+
| `pause` | Emergency pause all user-facing instructions |
104+
| `unpause` | Resume protocol operations |
77105

78106
---
79107

@@ -163,7 +191,7 @@ npm run localnet:logs
163191

164192
The container bootstraps the full protocol: initializes GlobalState and the HLX mint, funds a test wallet with 100 SOL and 10,000 HLX. RPC available at `http://localhost:8899`.
165193

166-
See [docker/README.md](docker/README.md) for Apple Silicon notes and troubleshooting.
194+
Requires Docker with ARM64 support on Apple Silicon.
167195

168196
---
169197

@@ -185,17 +213,17 @@ anchor verify E9B7BsxdPS89M66CRGGbsCzQ9LkiGv6aNsra3cNBJha7
185213

186214
## Security
187215

216+
- **Chain binding**: Explicit runtime program ID assertion in `initialize` — forks cannot reuse the protocol at a different address
188217
- **Admin authority**: All privileged instructions require multisig via Squads v4
189218
- **Two-step authority transfer**: `transfer_authority` + `accept_authority` prevents accidental lockout
190-
- **Integer safety**: `overflow-checks = true` in release profile; `saturating_sub` used in BPD finalization
219+
- **Emergency pause**: `pause` / `unpause` instructions halt all user-facing operations
220+
- **Integer safety**: `overflow-checks = true` in release profile; checked arithmetic throughout
191221
- **BPD transparency**: 24-hour observation window before `seal_bpd_finalize` can be called
192-
- **Anti-whale protections**: 5% per-stake BPD cap; BPB diminishing returns above 1.5B tokens
222+
- **Anti-whale protections**: 5% per-stake BPD cap; BPB three-tier diminishing returns; duration loyalty multiplier
193223
- **Frontend**: All transactions simulated before presenting to wallet
194224
- **Indexer**: Atomic checkpoint + event writes; no partial state
195225
- **RPC proxy**: Method whitelist + per-IP rate limiting
196226

197-
Audit findings and remediations: `specs/001-fix-audit-findings/`
198-
199227
---
200228

201229
## Project Structure
@@ -226,4 +254,4 @@ tests/bankrun/ # Bankrun test suite
226254

227255
## License
228256

229-
[Add license here]
257+
This project is licensed under the [Elastic License 2.0](LICENSE) — a source-available license that permits use, modification, and distribution but prohibits offering the software as a hosted or managed competing service. See [LICENSE](LICENSE) for the full terms.

0 commit comments

Comments
 (0)