Stablecoin Application Workflow
A stablecoin is a fungible token that represents digital currency with built-in compliance enforcement.
The stablecoin scenario enforces know your customer (KYC) and anti-money laundering (AML) policies, transfer restrictions, and multi-party approvals. The system supports direct transfers and hold-based transfers, which require approval before the transfer occurs.
- Minter, burner, and notary roles are required.
- The account policy enforces KYC/AML and restriction flags.
- The approval policy defines thresholds and sequential approver requirements for hold-based transfers.
- Transfer restrictions are optional and can be configured at any time.
- Approval policy matching is used to determine whether approvals are required when the
holdTokensAPI is used. - Transaction history APIs support auditing and monitoring.
| Actor | Role | Description |
|---|---|---|
| Administrator | Token Admin | Initializes the system, assigns roles, creates account and approval policies. |
| Minter | Minter | Requests minting of tokens. |
| Mint Approver | Notary | Approves or rejects mint requests. |
| Burn Approver | Notary | Approves or rejects burn requests. |
| Sender | none | Initiates direct or hold-based transfers. |
| Approver | none | Approves transactions in a defined sequence. Approvers are regular account holders who specified as approvers in the approval policy (not by an assigned role). |
| Notary | Notary | Completes or releases hold-based transfers after approval. |
| Receiver | none | Receives transferred tokens. |
| Auditor | Token Auditor | Queries transaction history for compliance and reporting purposes. |
- Initialize a stablecoin by using the
initializeStablecoinTokenAPI. - Register organizations by using the
registerOrgAPI. - Create accounts by using the
createAccountandassociateTokenToAccountAPIs. - Assign the minter, burner, and notary roles to the appropriate accounts by using the
addRoleAPI. - Create account policies by using the
createStablecoinAccountPolicyCheckAPI. - Create approval policies by using the
createApprovalPolicyCheckAPI.
- Mint stablecoins.
- The minter uses the
requestMintAPI to submit a request to mint stablecoins. - The mint approver uses the
approveMintAPI to review and approve the request to mint stablecoins. Alternately, the mint approver can userejectMintAPI to deny the request.
- The minter uses the
- Transfer stablecoins without approvals.
- The sender uses the
transferTokensAPI to send stablecoins to a user.
- The sender uses the
- Transfer stablecoins with approvals.
- The sender uses the
holdTokensAPI to request transfer of the tokens. - If required, approvers use the
approveTransactionAPI to approve the transfer, as specified by the approval policy. - The notary uses the
executeHoldTokensAPI to approve the transfer request. Alternately, the notary can use thereleaseHoldAPI to reject the transfer.
- The sender uses the
- Verify token balance.
- Users can use the
getAccountBalanceAPI to get the amount of stablecoins they hold.
- Users can use the
- Burn tokens.
- Users can use the
requestBurnAPI to submit a request to burn their stablecoins. - The burn approver uses the
approveBurnAPI to review and approve the request. Alternately, the burn approver can userejectBurnAPI to deny the request.
- Users can use the
- Audit the transaction history.
- Auditors and users can use the
getAccountTransactionHistoryandgetAccountTransactionHistoryWithFiltersAPIs to get transaction history for auditing and reporting.
- Auditors and users can use the
Account Policy Validation
Account policies are mandatory for all accounts that transfer or hold stablecoins. Account policies are validated in the following APIs: transferTokens, holdTokens, approveTransaction, executeHoldTokens.
Each account policy includes three parameters: KYC, AML, and restrictionFlag. These are validated for both sender and receiver before any tokens are transferred.
-
KYC(Know Your Customer) - The transfer is allowed only when KYC values are
truefor both the sender and receiver accounts. -
AML(Anti-Money Laundering) - The transfer is allowed only when AML values are
truefor both the sender and receiver accounts. -
restrictionFlag - If the restriction flag is set to
falsefor both the sender and receiver account, validation passes. If the restriction flag is set totruefor either the sender or receiver account, for theholdTokens,approveTransaction, andexecuteHoldTokensAPIs, the transfer is allowed only if a lowest available approval policy exists and if the amount is within the policy limits. Otherwise, the transfer is blocked. For thetransferTokensmethod, the transfer is allowed only if the amount is in the lower and upper bounds of the transfer restriction limits.
Approval Policy Matching
Approval policy matching is triggered after a call to the holdTokens API. Approval policies define transaction thresholds, required numbers of approvals, and approver details, and set the sequence for multi-level approvals. An approval policy is mandatory for a hold operation. Without an approval policy, users cannot hold or transfer tokens when restrictions apply.
Approval policy matching determines whether approvals are required before the notary can complete the hold transfer. If approvals are required, approval policy matching determines which approvers are needed and in what sequence.
If no restriction flag is set for both sender and receiver, the hold amount is compared against all configured approval policy thresholds to find a match. If a match is found, the corresponding approvers and sequence are used. If no match is found, no approval is required and the transaction proceeds directly to the notary.
If a restriction flag is set for either sender or receiver, the lowest available approval policy is used. If no policy is available, the transaction is blocked.
- Required approvers
- Approval sequence
- Required number of approvals
Transaction Approval
Transaction approval validation is triggered after a call to the approveTransaction API. The validation enforces all of the approval rules that are defined in the approval policy that was matched during the call to the holdTokens API. The validation runs for each approver in sequence according to the following steps.
- Validate Approver Identity: Checks if the current user exists in the required approvers list from the approval policy.
- Validate Sequence Order: Checks if the current approver is the expected approver at the current sequence position.
- Check for Duplicate Approval: Prevents the same approver from approving the same transaction more than once.
- Account Policy Validation: Runs account policy validation again to ensure that the sender and Receiver account statuses have not changed since the hold was created.
- Record Approval: Records the approval with time stamp, increments the approval count, and checks if all required approvals are complete.