Comment on page
Assets and Balances
This section describes how user assets, or rather portfolios of assets, are organized within Genshir.
"Asset" is a generic term describing some cryptocurrency. Assets can be thought of as tokens inside the Polkadot ecosystem, at least to the extent that they also have some supply, as well as logic governing changes to this supply.
Genshiro's assets are fundamentally different from Polkadot’s assets and currency in, that we do not define mint / burn / transfer operations for them. An asset module is purely a storage of assets parameters. We have different asset types within the system:
- Native: EQ for Equilibrium, GENS for Genshiro - this is our native asset. Native assets can not be borrowed (might be changed in the future via Governance).
- Physical: Any asset that is bridgeable into our parachain - KSM or DOT based assets via XCM, other blockchain based assets (BTC, ETH, BNB, etc.) via the bridge.
- Synthetic: Synthetic assets e.g. perpetuals contract on SPX index
- LP tokens: Liquidity Pool Tokens from Curve and Yield AMMs.
Genshiro protocol works with this asset data structure.
Genshiro uses the substrate balances module to store and modify user account balances. There are several key differences that distinguish Genshiro's balances module from the standard balances module.
All users in the system have one master account and two sub-accounts: borrower and bailsman. There is also a 3-rd sub-account type called lender which is unused for now, since bailsmen also act as lenders in the system.
Master account plays the role of your wallet in the system: all external transfers be that via bridge, or XCM end up modifying the balance of the master account, meaning your Polkadot wallet.
Both borrower and bailsman sub-accounts may hold multiple assets and multiple liabilities. Liabilities are "negative" balances of a sub-account. Borrowers get negative balances when they borrow assets in the system, while bailsmen get debt when borrowers liquidate, see details in the Bailsman mechanics section.