Skip to content

Add or remove agent commission

Access prerequisites

  • Permission (module): manageToken
  • License/Feature: STAKING_TOKENS
  • Menu container: GENERAL → group Investments / Financial Distributions → screen Staking Applications

What it is / when to use

Modal opened by the Agent commission icon (manage_accounts) on a staking application. Allows linking an agent (partner/referrer) to an application, defining the percentage they receive on the amount contributed by the client. The agent is then paid automatically according to the current contract. The modal has two sections: list (already linked agents) and add.

Prerequisites

  • The agent must already exist in the system (agent registration). Otherwise the backend responds with agent not found.
  • Permission: manageToken (dual — CPM enum on the backend + module in the DB).

Fields ("Add" tab)

FieldWhat it isRequired?System/backend effect
Agent IDIdentifier of the agent to be linkedYesSent as agentId to createAgentsLinkedStaking; validates agent existence
PercentageCommission percentage on the contributed amountYesSent as percentage; defines how much the agent receives; automatic payment according to contract

The Apply button remains disabled while both (percentage and agent ID) are not filled in.

Actions and modals

  • Apply (add): calls createAgentsLinkedStaking (stakeId + agentId + percentage). Handles distinct errors: agent not found and stake not found.
  • Delete (in the list): opens a confirmation (bottom-sheet); upon confirmation, calls deleteAgentsLinkedStaking by the link's id.

Business rules / notes

Attention

  • The commission is applied on the amount contributed by the user and the agent is paid automatically according to the current contract — there is no manual entry.
  • Errors are differentiated: non-existent agent, non-existent application (stake), and non-existent commission (when deleting).
  • Financial values: the commission percentage follows BigNumber treatment of financial values.