Staking
Access prerequisites
- Permission (module):
manageToken - License/Feature:
STAKING_TOKENSenabled in the tenant license (Vault). - Menu container: GENERAL → Products group → Staking
What it is / when to use
Staking allows the operator to configure yield products on tokens: the user locks (stakes) a quantity of a token and, periodically, receives yield payments in another token (or the same one). This screen manages staking configurations (StakingConfig) — the "product rules" — not the individual user applications (those are found in Staking Applications).
Use this to create a new staking product, adjust rates/terms, activate/deactivate, or open a product dashboard to monitor applications.
Prerequisites
- Permission:
manageToken(CPM static enum + dynamic module in the DB). - License/Feature:
STAKING_TOKENSenabled. If disabled, the menu item does not appear at all. - Dependencies: the stake token (
unit_of_money) and the payment token (unit_to_pay) must already exist on the platform.
Step by step
- Go to Products → Staking.
- The list shows products by name, stake token, payment token, and status (active/inactive).
- Use Create to open the configuration modal.
- Fill in the fields and save.
- On each row, use Edit, Dashboard (monitor applications), or Delete.
Fields (configuration modal)
| Field | What it is | Required? | System/backend effect |
|---|---|---|---|
Name (name) | Name of the staking product | Yes | Identifies the configuration. |
Stake token (unit_of_money) | Token the user locks | Yes | Defines the asset accepted for staking. |
Payment token (unit_to_pay) | Token in which yield is paid | Yes | Defines the payout asset. |
Term (stakingLength) | Duration of the staking | Yes | Must be > 0 (BigNumber). Combined with periodType. |
Period type (periodType) | M (months) or Y (years) | Yes | Default M. |
Value to apply (valueToApply) | Yield rate/percentage | Yes | Must be > 0. Together with method (always P = percentage) and thresholdToApply, governs the payout calculation. |
Threshold (thresholdToApply) | Minimum value for yield to apply | No | Range from which yield is applied. |
Exit fee (exit_fee) | Penalty for early withdrawal | No | Applied when there is a withdrawal before the term ends. |
Monthly payments (monthlyPayments) | Pays yield month by month | No | Persisted as 1 (on) or -1 (off). |
Allow early withdrawal (allowEarlyWithdraw) | Allows redemption before the term | No | Enables early withdrawal (subject to exit_fee). |
Hold (hold) | Additional retention/lock | No | Product behavior flag. |
Terms (terms, upload) | Product terms document | No | Upload via files API (max 30 MB); stores the URL. |
Active (is_active) | Product available for new stakes | No | Default true on creation. Deactivating does not cancel existing applications; it only prevents new ones. |
Actions and modals
- Create / Edit: opens the
StakeTokensModalComponentmodal. Save is disabled while name, tokens, term > 0, and value > 0 are missing. - Dashboard: navigates to
manage-stakes/dashboard/:idto monitor the product's applications. - Delete: removes the configuration (with confirmation) and reloads.
- Help: troubleshooting button opens the built-in staking guide.
Business rules / considerations
Attention
- Term and value to apply must be > 0 (validated as BigNumber); otherwise the save button remains blocked.
- Deactivating a product does not affect already-made applications — it only prevents new enrollments.
methodis fixed toP(percentage) on save, even if the model allows other methods.
- Idempotency: staking payouts are idempotent — reprocessing a payment (after retry/crash) is safe; the FinLib errorCode
E00021"already processed" means success. - Financial values: value, threshold, exit fee, and term are all treated as BigNumber — no rounding.
Examples
Scenario 1 — 12-month staking with monthly payments
- Create a product: stake token = AXT, payment token = tBRL.
- Term 12, period
M(months), value to apply 1.5 (percentage), monthly payments on. - No early withdrawal (
allowEarlyWithdrawoff). - The user who enrolls locks AXT and receives tBRL every month according to the percentage.
Scenario 2 — Annual product with early withdrawal and penalty
- Term 1, period
Y(year), value to apply 18 (percentage per year). allowEarlyWithdrawon,exit_fee5.- The user can withdraw before 1 year, but pays an exit penalty of 5.
Scenario 3 — Pause enrollments without affecting existing stakers
- Edit the product and uncheck Active.
- New enrollments are blocked; ongoing applications continue to yield and pay normally.