Bank
This documentation aims to provide a comprehensive understanding of Unit Network's banking system.
It caters to both users and developers, offering insights into the technical components and inner workings of the system to facilitate informed decision-making and development processes.
Overview: Unit Network Banking System
Importance of Banking System:
The banking system is pivotal within the Unit Network, serving as its foundation for asset management and transaction execution.
It offers a robust and adaptable framework to handle various assets efficiently and securely.
Diverse Functionality and Solutions:
The banking system encompasses diverse functionalities and storage solutions tailored to manage different asset types effectively.
It provides specialized roles to distinct banks within the network, ensuring optimized performance for specific tasks.
Efficient Asset Management:
Unit Network's banking system ensures efficient management of a wide range of asset types, including cryptocurrencies, tokens, and other digital assets.
It facilitates seamless transactions and storage solutions to cater to the needs of both individual users and institutional clients.
Secure Transaction Execution:
Security is paramount within the Unit Network banking system, with robust measures in place to safeguard assets and data during transactions.
Through encryption, authentication protocols, and other security mechanisms, the system ensures the integrity and confidentiality of transactions.
Technical Insights: Asset Transfer in Unit Network
Asset-Bank Association:
Each asset type within the Unit Network is linked to a specific bank identified by its unique token ID.
This association ensures that assets are managed and transferred within the appropriate banking framework.
Primary Extrinsic Functions:
The bank pallet exposes five primary extrinsic functions for asset transfer, facilitating seamless transactions within the Unit Network.
User Asset Transfer:
Users can transfer assets to a designated bank, initiating transactions from their wallets to the specified destination bank.
Asset Creator Privileges:
Asset creators hold the privilege to transfer assets from the originating bank to users, enabling the distribution of assets to intended recipients.
Bank-to-Bank and Bank-to-Treasury Transfers:
Banks possess the authority to transfer assets to other banks and treasuries within the Unit Network, facilitating inter-bank transactions and asset management.
Event Signaling:
Each executed transfer triggers an event in the Unit blockchain, serving as a notification of the transaction's outcome.
Successful transfers are recorded as completed events, while failed transfers due to reasons like insufficient balance or lack of permission are indicated as error events, providing transparency and accountability in asset transactions.
Key Highlights: Asset Transfer and Bank Operations
Token Creator Authority:
Token creators hold the authority to transfer assets between users, banks, and treasuries within the Unit Network, facilitating asset management and distribution.
Bank Identification:
Banks within the Unit Network are uniquely identified by their IDs, which mirror the IDs of the tokens they represent, ensuring a clear association between assets and their corresponding banks.
Default Supply Minting:
Upon token creation, a default supply is minted to the respective token's bank, providing an initial allocation of assets for circulation.
The default supply is fixed but adjustable, allowing token creators to tailor the supply to meet specific requirements.
Total Supply Dynamics:
Outgoing transfers from a bank result in an increment in the total circulating supply of the transferred tokens, reflecting the movement of assets within the network.
Token Supply Management:
Token creators retain the capability to increase the total supply of tokens; however, all tokens must remain within the bank.
Modifications to the total supply or token symbol are restricted once tokens have been transferred out of their respective bank, ensuring stability and integrity within the network.
Modification Limitations:
For instance, once a token is transferred out of its bank, the token creator loses the ability to change the total supply or token symbol, enhancing accountability and preventing unauthorized modifications.
Supply Adjustment Mechanism:
Modifications to the default supply of newly created tokens can be accomplished through the assets pallet, providing a streamlined mechanism for supply adjustments and management.
Storage Management Overview:
BankTokens Storage:
Purpose: Monitors the quantity of tokens held within a specified bank.
Access Keys: Utilizes token ID and bank ID to retrieve the balance of a particular token within its corresponding bank.
NextTransactionId Storage:
Purpose: Maintains the identifier for the next transaction to occur within a bank.
Transaction Identification: Initially, the first transaction of a bank is assigned the ID 0, with subsequent transactions incrementing this ID sequentially.
Access Key: Bank ID is utilized to access the next transaction ID.
Bank Transactions Storage:
Purpose: Preserves detailed information regarding transactions within a bank.
Access Keys: Transaction details can be retrieved using the bank ID and transaction ID.
Information Stored: Includes token ID, transaction amount, sender, and receiver details, providing comprehensive insight into the movement of assets within the network.
Diverse Bank Types Overview:
In the Unit Network ecosystem, various bank types serve specialized roles in managing a wide range of assets, including fiat stable tokens, user-generated cryptocurrencies, and wrapped cryptocurrencies. These banks are essential for facilitating transactions, storing assets securely, and maintaining the stability and integrity of managed tokens. Each bank type possesses unique characteristics and operational mechanisms tailored to the specific requirements of the supported asset types.
Fiat Stable Token Banks:
Role: Facilitate the management and exchange of fiat-pegged stable tokens within the network.
Characteristics: Designed to maintain the pegged value of stable tokens to their respective fiat currencies, ensuring stability and reliability in transactions.
User-Generated Cryptocurrency Banks:
Role: Handle the issuance, storage, and transfer of cryptocurrencies created by users within the Unit Network.
Characteristics: Provide flexibility for users to generate and manage their cryptocurrencies, fostering innovation and diversity within the network.
Wrapped Cryptocurrency Banks:
Role: Manage wrapped versions of external cryptocurrencies, enabling their utilization within the Unit Network ecosystem.
Characteristics: Serve as custodians for wrapped cryptocurrencies, ensuring seamless interoperability between external blockchain networks and the Unit Network.
Each bank type plays a crucial role in supporting the functionality and growth of the Unit Network ecosystem, catering to the diverse needs of users and enhancing the overall utility and efficiency of asset management within the network.