orbitlabs
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note No publishing access yet

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.

      Your account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

      Your team account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

      Explore these features while you wait
      Complete general settings
      Bookmark and like published notes
      Write a few more notes
      Complete general settings
      Write a few more notes
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Make a copy
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Make a copy Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note No publishing access yet

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.

    Your account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

    Your team account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

    Explore these features while you wait
    Complete general settings
    Bookmark and like published notes
    Write a few more notes
    Complete general settings
    Write a few more notes
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    # Terra Classic USTC Staking System — Technical Implementation Proposal ## Executive Summary Following Signal Proposal 12219 (USTC Staking System), which passed, OrbitLabs proposes the technical implementation of a native USTC staking system on Terra Classic Layer 1. This proposal introduces staking utility for USTC holders through a new dedicated module, `x/ustcstaking`, enabling delegation, reward accrual, and validator commission — all while preserving LUNC as the sole consensus staking asset. USTC staking runs in parallel to the existing LUNC staking module and has zero impact on validator set selection, voting power, or consensus security. By keeping USTC staking architecturally separate from consensus, we deliver a clean, auditable rollout that strengthens USTC utility and sets a foundation for future revenue-driven reward integration (MM2, protocol fees). ## Motivation **Utility Expansion:** USTC currently lacks native Layer 1 utility. Introducing staking creates immediate on-chain engagement. **Supply Locking:** Encourages voluntary locking of circulating USTC, reducing sell pressure and improving market structure. **Validator Alignment:** Strengthens community engagement with validators without affecting consensus power. **Future Revenue Integration:** Provides a framework that can later integrate protocol revenue (MM2, fees) into reward distribution. ## Scope of Work ### 1. New Module: `x/ustcstaking` A dedicated Cosmos SDK module that runs in parallel to the existing staking module. Core features: - USTC delegation to validators - Undelegation with configurable unbonding period - Redelegation between validators - Reward accrual and claiming - Validator commission on USTC rewards The module reads validator metadata from `x/staking` (read-only) and maintains its own bookkeeping for USTC delegations, unbonding queue, redelegations, and reward distribution. It does not modify `x/staking`, `x/distribution`, `x/slashing`, or `x/gov` state. LUNC remains the only staking asset for consensus. ### 2. Core Functionality **Delegation System** — users delegate `uusd` to validators; delegations are tracked independently from LUNC staking; the validator address serves as an accounting endpoint only. **Unbonding Logic** — configurable unbonding period (e.g. 7 days). An optional instant-unbond path with a governance-controlled penalty is supported via parameter but disabled at launch. **Validator Commission** — each validator has a USTC-specific commission rate `ustc_commission`, distinct from their LUNC `x/staking` commission. Commission is paid in `uusd` to the validator's existing `x/distribution` withdraw address. ### 3. Reward Distribution USTC reward distribution follows the **standard Cosmos SDK staking model** (`x/staking` + `x/distribution`), with two deliberate deviations: 1. **Reward source.** Rewards come from a pre-funded pool inside the `x/ustcstaking` module account. Each epoch, a governance-set amount of `uusd` is released from the pool and distributed across active delegations proportional to stake. The released amount is bounded by a three-cap minimum formula described below (planned budget / APR ceiling / pool-safe release rate). APR is a derived outcome, not a fixed target. Standard staking sources rewards from block inflation and transaction fees; USTC staking does not touch either. 2. **No slashing.** USTC principal is never slashed for validator misbehavior. Standard staking applies slashing fractions to delegator stake on consensus faults; USTC delegators are immune. All other mechanics — F1 continuous accrual, per-validator commission, withdraw via `MsgWithdrawUSTCRewards`, redelegation cooldown, unbonding queue — match the standard model. Accounting lives inside `x/ustcstaking` (not in the shared `x/distribution` ledger) so USTC rewards stay on USTC delegators and don't leak into LUNC delegators' withdrawals. The mechanism follows the same pool-aware decay pattern as the Terra Classic `x/oracle` pool: as the pool shrinks, the per-epoch reward shrinks proportionally, so the pool asymptotically approaches zero rather than hitting a hard cliff. **Reward Pool** The reward pool is held in the `x/ustcstaking` module account in `uusd`. It is funded **permissionlessly** via `MsgFundUSTCRewardPool` — any address (treasury, community member, protocol revenue source, or external sponsor) may contribute `uusd` to top it up. Top-ups are restricted to `uusd`. **Pool Sustainability and Reward Target** The economic goal of the reward pool is to incentivise a meaningful portion of USTC supply to be voluntarily locked in native staking — targeting **5–10% of circulating supply**. With ~6 billion USTC in circulation, that translates to roughly 300–600 million USTC locked. Initial parameters proposed (governance-tunable): - **Initial reward pool**: 30,000,000 USTC - **Minimum runway**: 2 years - **Starting annual budget**: 30M / 2 = 15M USTC/year Resulting effective APR curve: | Total active USTC stake | Effective APR | |---|---| | 150M USTC | ~10% | | 300M USTC | ~5% | | 600M USTC | ~2.5% | If participation is low, APR rises and encourages more staking. If participation is high, APR falls naturally as the budget is shared across more delegators. This creates a self-balancing incentive curve toward the supply-lock target without guaranteeing a fixed APR forever. **Epoch Reward Calculation** Each epoch's reward is the **minimum** of three caps: $$\text{actual\_epoch\_reward} = \min(\text{base\_budget},\ \text{apr\_cap},\ \text{pool\_safe})$$ Where: - $\text{base\_budget} = \text{initial\_reward\_pool} / \text{minimum\_reward\_years} / \text{epochs\_per\_year}$ — the planned target rate - $\text{apr\_cap} = \text{total\_active\_stake} \cdot \text{max\_apr} / \text{epochs\_per\_year}$ — prevents extreme APR when stake is very small (e.g. early bootstrap) - $\text{pool\_safe} = \text{reward\_pool\_balance} \cdot \text{max\_pool\_release\_rate\_per\_epoch}$ — pool-aware cap; rewards shrink as the pool shrinks Effective APR is a derived metric: $$\text{effective\_apr} = \frac{\text{actual\_epoch\_reward} \cdot \text{epochs\_per\_year}}{\text{total\_active\_ustc\_stake}}$$ **Pool Decay Behaviour** Under normal operation the pool follows the pool-aware release curve: as the pool shrinks the per-epoch reward shrinks proportionally, so the pool decays smoothly toward zero without a hard depletion event. If the pool balance falls below a governance-defined minimum reserve threshold, the module emits a `USTCRewardPoolLow` event and reduces rewards to a dust-safe minimum until the pool is refunded. A `USTCRewardPoolDrained` event is reserved for exceptional cases such as rounding exhaustion, governance misconfiguration, or emergency migration. Principal remains withdrawable through the normal undelegation and unbonding process regardless of pool state. The module never permanently locks user principal. **Worked Example** Initial conditions: pool = 30M USTC, daily epoch, `minimum_reward_years` = 2, `max_apr` = 250%, `max_pool_release_rate` = 0.2% per epoch, total active stake = 150M USTC. Alice holds 1,500,000 USTC delegated to V1, which has 30M USTC total delegations and a 5% commission. Computing the three caps for the first epoch: - $\text{base\_budget} = 30{,}000{,}000 / 2 / 365 \approx 41{,}096$ USTC/epoch - $\text{apr\_cap} = 150{,}000{,}000 \cdot 2.5 / 365 \approx 1{,}027{,}397$ USTC/epoch (not binding) - $\text{pool\_safe} = 30{,}000{,}000 \cdot 0.002 = 60{,}000$ USTC/epoch (not binding) - $\text{actual} = \min(41{,}096,\ 1{,}027{,}397,\ 60{,}000) = 41{,}096$ USTC Distribution: 1. V1's gross share: $(30{,}000{,}000 / 150{,}000{,}000) \cdot 41{,}096 \approx 8{,}219$ USTC 2. V1's commission: $0.05 \cdot 8{,}219 \approx 411$ USTC → paid to V1's withdraw address 3. Net to V1's delegators: $8{,}219 - 411 \approx 7{,}808$ USTC 4. Alice's share: $(1{,}500{,}000 / 30{,}000{,}000) \cdot 7{,}808 \approx 390$ USTC Effective APR at this epoch: $41{,}096 \cdot 365 / 150{,}000{,}000 \approx 10\%$. As the pool shrinks over time, `pool_safe` eventually becomes the binding cap and emission tapers smoothly. For example, when the pool reaches 10M, `pool_safe` = 20,000 USTC/epoch — below `base_budget` — emission drops, APR drops, and the remaining pool decays asymptotically rather than linearly to zero. ### 4. Slashing & Validator Lifecycle Policy USTC principal is **never** slashed for validator misbehavior. USTC stake has no consensus role, so consensus faults (downtime, double-sign) do not propagate to principal. Validator state changes affect reward accrual and delegation availability only. | Upstream state | Principal | Reward accrual | New delegations | |---|---|---|---| | Bonded | safe | accrues | accepted | | Jailed (downtime) | safe | paused, no retroactive on unjail | blocked | | Unjailed | safe | resumes from unjail block | accepted | | Tombstoned (double-sign) | safe | ends | blocked; existing delegations force-unbond | | Voluntary unbond | safe | paused | blocked | Paused rewards stay in the pool (not redirected, not burned). A future governance-controlled penalty parameter may affect rewards only; storage keys reserved. ### 5. Parameters & Messages All staking behavior is governed by adjustable parameters: `enabled`, `bond_denom`, `unbonding_time`, `reward_epoch`, `max_validator_share`, `min_delegation`, `instant_unbond_fee_bps`, `oracle_enabled`, plus reward-model parameters (`initial_reward_pool`, `minimum_reward_years`, `max_apr`, `max_pool_release_rate_per_epoch`, `pool_low_threshold`) and operational parameters for unbonding entries, redelegation cooldown, commission cap, and emergency pause. Message types include `MsgDelegateUSTC`, `MsgUndelegateUSTC`, `MsgBeginRedelegateUSTC`, `MsgWithdrawUSTCRewards`, `MsgFundUSTCRewardPool` (permissionless), `MsgUpdateUSTCParams` (governance), `MsgEmergencyPause` (governance), and `MsgUpdateValidatorUSTCCommission` (validator-signed, throttled). ### 6. Emergency Pause Scope When the pause flag is set via governance: - **Blocked:** new delegations, redelegations, commission edits - **Allowed:** undelegations, reward withdrawals, in-flight unbonding completion Withdrawal paths must always remain open. Emergency pause must never lock user funds. ### 7. Activation & Genesis The module ships via a chain software upgrade handler with `enabled = false` by default. A separate governance proposal flips `enabled = true` after: - Initial reward pool is funded (source: TBD — community pool spend, treasury, or external sponsor) - Parameters are reviewed and set - Testnet validation has completed ### 8. Testnet & QA Deploy module on Terra Classic testnet. Testing includes: - Delegation, undelegation, redelegation flows - Reward accrual accuracy across multiple validators and delegators - Validator lifecycle transitions (jail, unjail, tombstone, voluntary unbond) and their effect on USTC delegations - Pool drain and refund scenarios - Emergency pause behavior across all message types - Parameter changes via governance, including mid-epoch Acceptance: zero state divergence between nodes, reward math matches reference calculator within rounding tolerance, no observable validator-set or voting-power impact. Results published for validator and community review before mainnet. ### 9. Documentation - Module specification (state, messages, hooks, params) - Validator operator guide (USTC commission setup, expected behavior) - CLI / LCD / gRPC reference with usage examples - Integration notes for wallets and explorers - Reward calculator with worked examples ## How USTC Staking Differs from LUNC Staking | Area | LUNC Staking (`x/staking`) | USTC Staking (`x/ustcstaking`) | |---|---|---| | Bond denom | `uluna` | `uusd` | | Consensus role | Yes — determines voting power | None | | Slashing on faults | Yes (downtime, double-sign) | No — principal never slashed | | Governance voting | Yes — LUNC stake votes | No — does not count toward gov voting | | Reward source | Block rewards + fees | Pre-funded reward pool (governance) | | Reward accounting | F1 distribution (`x/distribution`) | F1-style, own ledger inside `x/ustcstaking` | | Validator set effect | Direct | None | ## Budget Total budget for the USTC staking implementation is **$34,000 USD**, split into two phases for accountability and alignment with deliverables. **Phase 1: Implementation & Testnet Validation — $25,000 USD** - Module implementation (delegation, unbonding, redelegation, reward distribution, commission) - Lifecycle hooks integration with `x/staking` and `x/slashing` - Emergency pause, parameter governance, and operational messages - Testnet deployment and full scenario testing - Reference reward calculator and preliminary documentation **Phase 2: Mainnet Execution & Post-Upgrade Support — $9,000 USD** - Preparation of mainnet upgrade governance proposal - Validator coordination and upgrade support - Mainnet upgrade execution and immediate post-upgrade monitoring - Final documentation (validator guide, dApp integration notes) *Out of scope at this budget:* wallet UI integrations, external security audit, marketing materials, and post-launch support beyond bug fixes. The LUNC equivalent for each phase will be calculated at the time of its respective community spend proposal submission. ## Timeline | Week | Milestone | |---|---| | 1–2 | Design lockdown: finalize parameter defaults, validator lifecycle behavior, reward math reference | | 3–6 | Module implementation: core delegation, unbonding queue, redelegation, F1 reward accrual | | 7–8 | Lifecycle hooks, validator commission, emergency pause, parameter governance | | 9–10 | Testnet deployment, scenario testing, bug fixes | | 11 | Documentation, validator and community review | | 12 | Governance proposal submission and mainnet upgrade preparation | ## Risks & Mitigation **Reward Pool Sustainability** — if the planned annual budget is set too aggressively for the pool size, runway shortens. *Mitigation:* three-cap emission formula (planned budget × APR ceiling × pool-safe release rate) ensures the pool decays smoothly toward zero rather than draining abruptly. As the pool shrinks, the `pool_safe` cap takes over and emission tapers asymptotically. `USTCRewardPoolLow` event fires below the reserve threshold; permissionless top-up via `MsgFundUSTCRewardPool` available at any time. **Validator Lifecycle Edge Cases** — mid-epoch jail, voluntary unbond, or tombstone events could affect delegators unpredictably. *Mitigation:* explicit lifecycle policy (Section 3), F1 continuous accrual handles mid-epoch state changes cleanly, comprehensive testnet scenarios cover all transitions. **Consensus Risk** — any architecture that touches validator state could threaten consensus security. *Mitigation:* parallel module design with no writes to `x/staking`, `x/distribution`, `x/slashing`, or `x/gov`. USTC stake never affects validator set selection or voting power. This is enforced at the keeper-interface boundary. **Initial Participation Uncertainty** — actual staking participation may differ from estimates, affecting reward economics. *Mitigation:* `max_apr` cap prevents extreme APR if early participation is small; pool drain rate is bounded by `max_pool_release_rate_per_epoch` regardless of participation level. Adding participants dilutes APR rather than accelerating pool drain. All thresholds are governance-tunable post-launch. ## Outcome Upon completion, Terra Classic will: - Support native USTC staking on Layer 1 with a clean architectural separation from consensus - Provide a new utility layer for USTC holders, encouraging voluntary supply locking - Preserve full consensus integrity — LUNC remains the only consensus staking asset - Establish a validated foundation for future revenue-driven rewards (MM2, protocol fees) and oracle-based emission adjustment --- **OrbitLabs**

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password
    or
    Sign in via Google Sign in via Facebook Sign in via X(Twitter) Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    By signing in, you agree to our terms of service.

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully