Referral Program
Access prerequisites
- Permission (module):
viewIndicationProgram(to read) /manageIndicationProgram(to create/edit/delete) - License/Feature: None
- Menu container: GENERAL → Referral Program group
What it is / when to use
Configures the referral programs (member-get-member): when someone referred by a user performs a covered action (invest in crowdfunding, execute an order, buy on the marketplace, stake, etc.), the referrer receives a commission. You define what the commission is based on (house fee or gross amount), the percentage, the covered events and caps per event/month.
The form includes presets (Conservative, Balanced, Aggressive), a live simulator and a narrative summary to validate the rule before saving.
Prerequisites
- Permission:
viewIndicationProgramto read;manageIndicationProgramto edit (dual permission: CPM enum + dynamic module in the DB). - License/Feature: None specific.
- Dependencies on other screens: commissions generated by these programs appear in Referral Commission History.
Step by step
- Go to the menu Referral Program → Programs (
/indication-program/programs). - The list shows each program with covered events and percentage. Click New or click a program to edit it (dedicated page, not a drawer).
- (Optional) Apply a preset to pre-fill base, percentage, caps and events.
- Choose the calculation base (On the house fee / On the gross amount).
- Select the covered events (chips).
- Set the percentage and, optionally, a per-event cap and a monthly cap.
- Use the simulator (gross amount + fee%) to check the resulting commission and read the narrative summary.
- Save.
Fields
| Field | What it is | Required? | Effect on the system/backend |
|---|---|---|---|
Name (name) | Program name | Yes | Identifies the program. Validated as non-empty. |
Description (description) | Free text | No | Informational only. |
Active (isActive) | Enables/disables the program | — | An inactive program does not generate commissions. |
Calculation base (baseKind) | What the percentage is applied to | Yes | SYSTEM_FEE = % of the fee the house charges (sustainable: never pays more than the fee; recommended). GROSS_AMOUNT = % of the gross amount of the operation (legacy; may exceed the fee and cause a loss). |
Covered events (appliesTo[]) | Which actions trigger a commission | Yes | List of events (crowdfunding, order, marketplace, NFT, staking, deposit…). Validated: at least 1 event. |
Percentage (percent) | % applied to the base | Yes | BigNumber string; validated > 0. |
Per-event cap (maxPerEventFiat) | Limit per individual commission | No | Caps the value of each commission; applied in the calculation (the simulator respects the cap). |
Monthly cap (maxPerMonthFiat) | Monthly limit per referrer | No | Each referrer receives at most this amount/month summing all commissions. |
Currency (unitOfMoney) | Asset credited in the commission | Yes (default tBRL) | Asset in which the commission is paid. |
Actions and modals
- New / Edit: dedicated page (
/indication-program/programs/newand/programs/:id/edit). - Apply preset: fills in base, percentage, caps and events from the chosen template (preserves name/description/active).
- Simulator: calculates via BigNumber the commission for a given gross amount and fee%, respecting the per-event cap. The narrative summary describes the rule in plain language.
- Save:
upsertProgramin CustomerProfileService (CPM). Validates name, ≥ 1 event and percentage > 0. - Delete: confirms and removes the program.
Business rules / cautions
Attention
- Prefer the
SYSTEM_FEEbase: it is sustainable because the commission never exceeds the fee charged. TheGROSS_AMOUNTbase is legacy and may pay more than the house receives — use only in controlled campaigns. - The Aggressive preset intentionally has no monthly cap — it is intended for time-limited campaigns. Do not leave it active indefinitely.
- All financial calculations use BigNumber (percentages and caps as strings) — do not round when reviewing.
- Idempotency: generated commissions are settled by FinLib (idempotent by
externalId); errorE00021("already processed") is success.
Examples
Scenario 1 — Sustainable program (Balanced)
- Apply the Balanced preset: base
SYSTEM_FEE, percentage25%, cap/event200, cap/month2000. - Events: crowdfunding, executed order, marketplace, staking.
- Simulator: R$ 1,000 operation with 2% fee → fee R$ 20 → commission R$ 5 (25% of the fee).
- Save. The referrer receives 25% of the fee in tBRL, limited by the caps.
Scenario 2 — Acquisition campaign (Aggressive, short window)
- Apply Aggressive: base
SYSTEM_FEE, percentage50%, cap/event500, no monthly cap. - Broad events (includes deposit and NFT purchase).
- Keep it active only during the campaign and disable it afterwards.
Scenario 3 — Commission on gross amount (legacy, with caution)
- Base
GROSS_AMOUNT, low percentage (e.g.1%), per-event cap mandatory to limit exposure. - Confirm in the simulator that the commission does not exceed the fee for a typical operation.
- Save with full awareness of the risk that the commission may exceed the margin.