Assets (currencies)
An Asset (also referred to as an Currency in backend) represents a unit of measurement within the system. This means that a currency can represent any entity tracked or counted in the system, such as fiat currency, electronic money, points, bonuses, and more.
Each currency is uniquely identified by a system-generated ID, which is assigned upon creation.
After the system set-up there are default currencies pre-defined by the configuration file.
PaaS clients may request adding specific currencies to the configuration.
Later on, System users with relevant permissions can add new currencies. Currencies can’t be deleted from the system via back-office or using the APIs. They can only be deactivated.
Asset Status
Status | Transition | Description |
Active | Disabled | Available to operate with (create accounts, set commissions, process operations with this currency) |
Disabled | Active | Unavailable to operate with (create accounts, set commissions, process operations with this currency) |
Service user with appropriate permission can change the Asset status – deactivate or Activate the asset. This is available from the back office and through the Update Currency API.
Currency entity structure
API GET /currencies
field name |
UI label in Asset list | description | value example |
id | ID | Unique UUID, generated by the system for each currency | 4a4917e4-7134-470f-9f89-9d1e26217acd |
currencyCode | Code | Currency code, can be any code specified by user or ISO currency code for fiat currency | USD |
digitalCode | Digital Code | Currency digital code, can be any code specified by user or ISO currency code for fiat currency | 840 |
name | Name | Currency name | US Dollar |
symbol | Symbol | Currency symbol for representation where it’s required | $ |
fraction | Fraction | Currency fraction – how many fractional units contains basic monetary unit, for example USD fraction is 100 which means that 1 dollar contains 100 cents | 100 |
scale | How many decimal places should be displayed when showing the balance for a specific currency | 2 | |
active | Status | Whether currency is active. If active is false all operations for the client`s wallets in this currency are forbidden, as well as the creation of new wallets in this currency. | true |
snPrefix | SN Prefix | This prefix can be used for generation of wallet serial numbers. Currently it is not used | 840_ |
isMain | Main asset | Whether currency is main. Main currency means that all exchange rates will be defined for this currency | true |
availableForExchange | – | Whether currency is available for exchange. | true |
type | Currency type | Possible values:
|
FIAT |
Currency wallet relation
Each wallet in the system is linked to a particular Currency during wallet creation. A wallet can be linked to one currency.
Currency patterns
Pattern to set currency: [id currencyCode name]: 4a4917e4-7134-470f-9f89-9d1e26217acd USD dollar
UI pattern for other usage: [currencyCode name]: USD dollar
Currency in accounting
Accounting in the system is always performed within one Currency. If several USD are created in the system as different currencies they are considered different currencies because they have different IDs. So, if it is required to move issued electronic money between different Currencies, top-up/withdrawal or exchange operations are used.
For this purpose, the currency exchange rate can be set up as 1.
Another example, if it is required to perform a transfer from wallet 1 in currency USD with ID 1 to wallet 2 in currency USD with id 2, the following operations should be done:
- exchange operation if both wallets belong to the same user
- exchange – transfer – exchange if wallets belong to different users
- or withdraw – top-up if wallets belong to different users
Asset Liability and Commissions Collected
The system calculates and updates the following parameters for each existing asset at the close of each operational day:
- Asset Liability: Represents the balance of the
issuing_balance
wallet for the current asset on the most recent closed operational day (available only for closed periods). - Commissions Collected: The total amount of commission collected in the current asset (both included and not included in circulation) for a closed operational day.
The following wallet types are included in the “Commissions Collected” calculation:
regular_system_commission
business_system_commission
regular_gate_commission
business_gate_commission