Deposit Token Application Workflow
A deposit token is a fungible token that represents a bank deposit.
The deposit token scenario supports issuance and distribution of tokens with minimal governance overhead. Tokens are minted by the creator and then issued to users by the issuer. The creator uses a hold-based transfer to send tokens to the Issuer, which requires sign-off by the approver. The issuer can distribute tokens directly to users with no further approvals required. Users do not need approvals to burn their own tokens.
- Minter and notary roles are required.
- The burner role is not required. Users can burn their own tokens by using the
burnTokensAPI. - The Issuer uses the
transferTokensmethod to transfer tokens to a user directly. - The only hold-based transfer is between the creator and the issuer.
The following table summarizes the actors in this scenario.
| Actor | Role | Description |
|---|---|---|
| Administrator | Token Admin | Initializes the system, assigns the minter and notary roles. |
| Creator | Minter | Requests minting and initiates hold-based transfer to the issuer. |
| Approver | Notary | Approves mint requests and completes hold transfers. |
| Issuer | none | Receives tokens from the creator and distributes them directly to users. |
| User | none | Receives tokens directly from the issuer. Users can burn their tokens with no approval required. |
The administrator completes the following steps to initialize the system.
- Initialize the deposit token system by using the
initializeDepositTokenAPI. - Register organizations by using the
registerOrgAPI. - Create accounts by using the
createAccountAPI. - Associate the token to accounts by using the
associateTokenToAccountAPI. - Assign the minter role to the creator and the notary role to the approver by using the
addRoleAPI.
After the system is initialized, a typical process flow follows these basic steps.
- Mint deposit tokens.
- The token creator uses the
requestMintAPI to submit a request to mint deposit tokens. - The approver uses the
approveMintAPI to review and approve the request to mint deposit tokens. The deposit tokens are credited to the creator's account. Alternately, the approver can userejectMintAPI to deny the request.
- The token creator uses the
- Transfer deposit tokens to the issuer.
- The creator uses the
holdTokensAPI to request transfer of the tokens to the issuer. - The approver uses the
executeHoldTokensAPI to validate and approve the transfer request. The deposit tokens are transferred to the issuer's account. Alternately, the approver can use thereleaseHoldAPI to reject the transfer.
- The creator uses the
- Issue tokens to users.
- The issuer uses the
transferTokensAPI to a user. The deposit tokens are credit to the user's account.
- The issuer uses the
- Burn tokens.
- User can use the
burnTokensAPI to redeem their deposit tokens.
- User can use the
- Verify token balance.
- Users can use the
getAccountBalanceAPI to get the total number of deposit tokens they hold.
- Users can use the