Settlement Token
Token used for settlement in the KAIO ecosystem.
General Description
The settlement token, as its name describes, is used for settling transactions within KAIO. It's value is equivalent to $1 USD, since each token represents one US dollar held by KAIO. In order to keep accounting clear and accurate, settlement tokens are burned and minted when KAIO performs actions such as subscribing or redeeming from the funds it tokenizes. While the main purpose of this token is to facilitate creating subscription orders, and receiving settlements from redemption orders for investors, it can also be transferred between users, and used in the secondary market.
Token Details
The settlement token follows the ERC-20 standard, implementing its interface. It's details are as follows:
Name
Settlement Token
Symbol
SET
Decimals
6
The settlement token has 6 decimals, meaning 0.000001 is it's lowest denomination. Its name and symbol are changeable by an admin. Additionally, it also extends the core ERC-20 functionality with custom logic, particularly around what kinds of users are allowed to send and receive tokens.
Transfers
Transfers are performed to update the balances of users. As described in the ERC-20 specification, this can be done directly by the sender, or by a third party that has been approved to do so.
Transfer
Function:
transfer(address to, uint256 amount)Purpose: Allows a user to transfer tokens from their address balance to another address.
Parameters:
address to: Address of the recipient.uint256 amount: The amount of settlement tokens to transfer.
Validation Checks:
Ensures the recipient is not the zero address.
Makes sure that the sender has a balance larger than the amount to be transferred.
Sender must be an investor, dealer, or have the role of the KAIO Admin.
Behavior:
Updates the balances of both addresses with the new amount of tokens for each.
Emits a
Transferevent, signaling the transfer has occurred.
Return Values:
bool: Signals if the transfer has been completed successfully.
Example:
transfer(0xRecepientAddress, 100);
Third Party Approval
Function:
approve(address spender, uint256 amount)Purpose: Allows a user to approve an address for a certain amount of tokens. The address can then transfer up to that amount of the investor's tokens.
Parameters:
address spender: Address being allowed to spend the users tokens.uint256 amount: The amount of settlement tokens allowed.
Validation Checks:
Ensures the spender is not the zero address.
Behavior:
Updates the spender's approval amount for the user's tokens.
Emits an
Approvalevent, signaling the approval has occurred.
Return Values:
bool: Signals if the approval has been completed successfully.
Example:
Third Party Admin Approval
Function:
approve(address _from, address _to, uint256 _allowance, bytes32 _role)Purpose: Allows an admin with the correct role to approve an amount of settlement tokens from an address to be spent by a specified address.
Parameters:
address _from: Address the tokens are allowed from.address _to: Address being allowed to spend the users tokens.uint256 _allowance: The amount of settlement tokens allowed.bytes32 _role: Admin role needed to call the function.
Validation Checks:
Checks the user has the proper admin role.
Ensures the spender is not the zero address.
Behavior:
Updates the spender's approval amount for the user's tokens.
Emits an
Approvalevent, signaling the approval has occurred.
Example:
Third Party Transfer
Function:
transferFrom(address from, address to, uint256 amount)Purpose: Allows a third party to transfer tokens from one address to another, using their previous allowance.
Parameters:
address from: Address the tokens are transferred from.address to: Address of the recipient.uint256 amount: The amount of settlement tokens to transfer.
Validation Checks:
Ensures both addresses are not the zero address.
Makes sure that the address transferring from has a balance larger than the amount to be transferred.
Checks that the caller has an allowance for the transferring address larger than the amount to be transferred.
Sender must be an investor, dealer, or have the role of the KAIO Admin.
Behavior:
Updates the balances of both addresses with the new amount of tokens for each.
Emits a
Transferevent, signaling the transfer has occurred.
Return Values:
bool: Signals if the transfer has been completed successfully.
Example:
Supply Increase & Reduction
Minting and burning tokens are the ways in which the total supply of settlement tokens changes. They are used to keep the accounting accurate to the USD balance held by KAIO.
Minting
Function:
mint(address _account, uint256 _amount, bytes32 _role)Purpose: Allows a user or contract with the appropriate role to mint new settlement tokens to an address. Primarily used by admins to reflect fiat inflows via bank transfer, or by the redemption book to reflect redemption settlements.
Parameters:
address _account: Address to mint the tokens to.uint256 _amount: The amount of settlement tokens to mint.bytes32 _role: Role of the caller.
Validation Checks:
Checks the caller has the proper admin role.
Ensures the recipient is not the zero address.
Behavior:
Updates the balance of the recipient address with the new amount of tokens.
Emits a
Transferevent from the 0 address, signaling the mint has occurred.
Example:
Burning
Function:
burn(address _account, uint256 _amount, bytes32 _role)Purpose: Allows a user or contract with the appropriate role to burn settlement tokens from an address. Primarily used by admins to reflect fiat outflows via bank transfer, or by the subscription book to reflect subscription settlements.
Parameters:
address _account: Address to burn the tokens from.uint256 _amount: The amount of settlement tokens to burn.bytes32 _role: Role of the caller.
Validation Checks:
Checks the caller has the proper admin role.
Ensures the address to burn the tokens from is not the zero address.
Behavior:
Updates the balance of the address from which tokens were burned with the new amount of tokens.
Emits a
Transferevent to the 0 address, signaling the burn has occurred.
Example:
Burning Balance
Function:
burnAll(address _account, bytes32 _role)Purpose: Allows a user or contract with the appropriate role to burn all the settlement tokens from an address.
Parameters:
address _account: Address to burn the tokens from.bytes32 _role: Role of the caller.
Validation Checks:
Checks the caller has the proper admin role.
Verifies the address to burn the tokens from has enough tokens to be burned.
Ensures the address to burn the tokens from is not the zero address.
Behavior:
Updates the balance of the address from which tokens were burned with a zero amount.
Emits a
Transferevent to the 0 address, signaling the burn has occurred.
Example:
Configuration
The settlement token can be configured to change it's behavior or qualities, such as with modifying the name and symbol.
Change Metadata
Function:
changeNameAndSymbol(string calldata _name, string calldata _symbol, bytes32 _role)Purpose: Allows an admin to change the name and symbol of the settlement token from the default Settlement Token and SET.
Parameters:
string _name: New token name.string _symbol: New token symbol.bytes32 _role: Role of the caller.
Validation Checks:
Checks the caller has the proper admin role.
Behavior:
Changes the token name.
Changes the token symbol.
Emits a
NameAndSymbolChangedevent, signaling the name and symbol have been changed.
Example:
Last updated
