HIP-25 reference: HACD staking (34/35), v3 supply-neutral economics, WASM wallet#13
HIP-25 reference: HACD staking (34/35), v3 supply-neutral economics, WASM wallet#13Moskyera wants to merge 35 commits into
Conversation
- Add hip25_testnet_seed genesis HACD+HAC for dev testnet - Fix load_config subcommand clash (poworker/diaworker) - Add hacash.exe poworker and diaworker subcommands - scripts/hip25_live_stake.ps1: full on-chain stake E2E - Serve wallet MVP at GET /hip25/wallet (portfolio, badges, stake/unstake)
…ot docs - Seed 5 HACD (WTYUIA,HXVMEK,VMEKBS,UIASHX,MEKUIA) for wallet label demos - Fix and extend WASM SDK transfer.rs with hacd_stake/hacd_unstake (kinds 34/35) - Add sdk_lib.rs + Cargo feature sdk for wasm32 builds - Wallet: testnet preset, RPC/WASM tx modes, badge UI unchanged - docs/hip25_testnet_boot.md + scripts/hip25_wallet_e2e.ps1 (verified E2E)
- try_state in ctx macros returns 503 instead of panic - Rate-limit all POST submit/operate/create/util routes - Fix origin_allowed, reject query secrets, allow_public_rpc guard - JSON body signing on transfer/fee/sign; cap block/datas limit
Audit hacash#4: P2P sig+execute gate, tx timestamp in try_execute_tx, cumulative miner packing, sync pool insert, rebuild-safe pool sweep, 256KB P2P tx cap Audit hacash#5: SDK loads from wallet origin only, SHA-256 integrity on /pkg/, DOM textContent, mainnet chain ID pin, stripped WASM exports, password clear Also: fix get_id_range filter, miner GET rate limit, remove dead ApiCtx rate_limiter
|
Any additional issuance of HAC (or redistributing HAC that was originally meant to be destroyed) requires careful and long-term consideration. One acceptable economic model is: mortgage HACD to borrow back the bid fees that be destroyed, but when repaying, you need to return the principal plus interest (more HAC). It's recommended to check out "HIP-2: HACD Mortgage Loan HAC" and "HIP-11: HAC Issuance Rules Consensus." The historical version of HIP-2 is implemented here: https://github.com/hacash/core/blob/master/actions/diamondlending.go |
… idle pool burn, supply stats
|
Thanks @jojoin, agreed that redirecting burn-bound HAC needs HIP-11-level consideration. We updated HIP-25 v2 economics (commit Changes
Unchanged
Docs: Mainnet |
Wallet: English labels/hints, signing address from password, portfolio mismatch warning, auto loan on HACD selection, mortgage preflight. RPC: staking/summary optional offset/limit; principal returns origination_burn and hacd_count. WASM: export create_account_by in browser builds.
- Add serde defaults to defineQueryObject for optional query params - Split wallet JS into modules served via /hip25/wallet/js routes - Preserve HACD selection on refresh; unified mortgage preflight - Surface 64-contract owner index limit in RPC and wallet UI - Add RPC query and principal quote unit tests - Document mortgage RPC, WASM actions, and index limit
⚫ Hello.I have a proposal regarding this matter, and I hope you will consider it. |
- Redirect DiamondMint fee_got (10% bid) to staking pool when active - Remove inscription protocol fee redirect; full protocol cost burns - RPC economics_version v3, fee_sources hacd_mint_miner_share - Docs: HIP25_ECONOMICS_V3.md; idle pool sweep counts hacd_bid_burn_zhu
Thanks for the detailed proposal, the dynamic formula tied to 50k bands and circulation is an interesting direction, and we agree on eliminating the 10% miner share on HACD mint (that’s what HIP-25 v3 does: redirect to stakers, supply-neutral). On lock / cooldown, we’d keep a minimum stake period rather than “exit in one HACD production time.” Miners don’t need a protocol lock because hashrate is already sunk cost (hardware, power, time). Staking without lock is cheap to enter and exit, which opens mercenary staking: stake right before rewards or a big mint, then unstake yield without real commitment to HACD. Our min stake (~90 days) + short cooldown (~3 days) is the staking equivalent of that commitment: it protects the pool from timing games and flash stake/unstake, keeps rewards for holders who actually stay, and still allows exit without a permanent trap. We’re open to discussing the exact durations, but zero lock would weaken the same money–value link the proposal aims to protect. |
Reframe fork as reference implementation for fullnodedev port, not legacy rust mainnet merge. Add formal HIP25_SPEC, roadmap, maintainer outreach templates, and community post.
Reference implementation status (not a merge request for legacy rust)Thanks again for the HIP-11 / HIP-2 economics note. Following that feedback we moved to v3 supply-neutral economics (
We now treat this PR as a reference implementation + community review, not a request to merge into legacy Formal spec draft: HIP25_SPEC.md Questions for maintainers:
We will not set a mainnet activation height without community consensus and maintainer agreement. Tag: v0.1.0-hip25-reference on the fork for a frozen reference point. |
Summary
Reference implementation of HIP-25 HACD staking on legacy Hacash Rust architecture (Moskyera/rust fork). Intended for spec validation, audits, and future port to fullnodedev.
HIP-25 (actions 34/35)
fee_got) → staking pool when active25714blocks), cooldown ~3d (864blocks)HIP-2 v2.1 (actions 15/16) — on same branch, complementary
Shared
/hip25/wallet(client-side signing on mainnet)prikeyonchain_id=0)Economics v3 (current)
Details:
docs/HIP25_ECONOMICS_V3.md· Formal spec:docs/HIP25_SPEC.mdAudit status
a79809448 consensus tests pass. CI:
.github/workflows/hip25-ci.yml.Mainnet safety
chain_id=0blocks server-sideprikeysigning RPCship25_testnet_seed/ demo flags panic on mainnetchain_idlisten_host=127.0.0.1,allow_public_rpc=falsetry_execute_txbefore relayHow to test
Testnet demo:
Mainnet wallet model:
scripts\BUILD_MAINNET_RELEASE.ps1 scripts\START_MAINNET_WALLET.batBreaking changes
None until
staking_activation_heightis reached on a network running this consensus.Configuration
hacash_mainnet_hip25.config.ini.example:Activation height set only after community + maintainer consensus (≥30 day notice).
Documentation
docs/HIP25_SPEC.mddocs/HIP25_ROADMAP.mddocs/HIP25_COMMUNITY_REVIEW.mddocs/HIP25_ECONOMICS_V3.mdRequest for maintainers
We treat this PR as discussion + reference, not legacy-rust mainnet merge.
Fork: https://github.com/Moskyera/rust/tree/hip-25-staking
Reference tag:
v0.1.0-hip25-referenceSpec: https://github.com/Moskyera/rust/blob/hip-25-staking/docs/HIP25_SPEC.md