Skip to content

Commit

Permalink
applied all the recommendations from luca and bader
Browse files Browse the repository at this point in the history
  • Loading branch information
kapetan3sid committed Sep 30, 2024
1 parent 5705afa commit 76adf09
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 11 deletions.
Binary file removed .DS_Store
Binary file not shown.
Binary file removed images/.DS_Store
Binary file not shown.
Binary file removed images/polkadot-protocol/.DS_Store
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description: The Account Balances page provides a comprehensive overview of the

# Account Balance Types

In the Polkadot ecosystem, accounts have different types of balances based on their activity. These balance types determine whether your funds can be used for transfers, to pay fees, or must remain frozen due to specific on-chain requirements.
In the Polkadot ecosystem, accounts have different types of balances based on their activity. These balance types determine whether your funds can be used for transfers, to pay fees, or must remain locked due to specific on-chain requirements.

!!! note "A more efficient distribution of account balance types is in development"
Soon, pallets in the Polkadot SDK will implement the [`fungible` trait](https://paritytech.github.io/polkadot-sdk/master/frame_support/traits/tokens/fungible/index.html){target=\_blank} (see the [tracking issue](https://github.com/paritytech/polkadot-sdk/issues/226){target=\_blank} for more details).
Expand All @@ -15,18 +15,18 @@ This update will enable more efficient use of account balances, allowing the fre
There are 5 types of account balances:

- **Free** - the balance available for on-chain activities such as staking and participating in governance, but not necessarily spendable or transferable
- **Frozen** - the portion of the free balance that is locked for specific purposes like [staking](path to staking page), [governance](path to governance page), or [vesting](path to Vested Transfers subsection in Types of Txs) (also referred to as locked balance)
- **On Hold** - the balance reserved for [identities](path to Account Identities section), [proxies](path to Proxy Accounts page), [OpenGov preimages and deposits](path to OpenGov deposits page). It is no longer free and is sometimes called reserved balance
- **Locked** - the portion of the free balance that is locked for specific purposes like [staking](path to staking page), [governance](path to governance page), or [vesting](path to Vested Transfers subsection in Types of Txs) (also referred to as locked balance)
- **Reserved** - the balance reserved for [identities](path to Account Identities section), [proxies](path to Proxy Accounts page), [OpenGov preimages and deposits](path to OpenGov deposits page).
- **Spendable** - the free balance that is fully available for spending or transferring
- **Untouchable** - the part of the free balance that cannot be transferred or spent, but can still be used for other on-chain activities

The spendable balance is calculated as follows:

```
spendable = free - max(frozen - on_hold, ED)
spendable = free - max(locked - reserved, ED)
```

where `free`, `frozen` and `on_hold` are defined above. The `ED` is the the **existential deposit**.
where `free`, `locked` and `reserved` are defined above. The `ED` is the the **existential deposit**.

!!! note
Wallet providers may display only **spendable**, **locked**, and **reserved** balances.
Expand All @@ -37,7 +37,7 @@ Locks are abstractions over an account's free balance, preventing it from being

Locks are automatically applied when an account participates in on-chain activities such as staking or voting, but they are not customizable by users.

Locks are included in the account's `frozen` balance, which represents funds that may be free but are non-transferable. This balance is tied up in activities such as [staking](path to staking page), [governance](path to governance page) and [vesting](path to Vested Transfers subsection in Types of Txs).
Locks are included in the account's `locked` balance, which represents funds that may be free but are non-transferable. This balance is tied up in activities such as [staking](path to staking page), [governance](path to governance page) and [vesting](path to Vested Transfers subsection in Types of Txs).

Locks can overlap in both amount and duration, following these general rules:

Expand All @@ -46,7 +46,7 @@ Locks can overlap in both amount and duration, following these general rules:

### Locks Example

Let's take, for example, 80 DOT as a frozen balance. These 80 DOT are currently used in staking and governance as follows:
Let's take, for example, 80 DOT as a locked balance. These 80 DOT are currently used in staking and governance as follows:

- 80 DOT Staking (just unbonded) -> lock 28 days
- 24 DOT OpenGov 1x conviction (referendum just ended, winning side) -> lock 7 days
Expand Down Expand Up @@ -81,7 +81,7 @@ Following the previous example, if you:
You will get a 6x conviction for 24 DOT

!!!info
Click [here](https://substrate.stackexchange.com/questions/5067/delegating-and-undelegating-during-the-lock-period-extends-it-for-the-initial-am){target=\_blank} for more information about this edge case.
Check [this](https://substrate.stackexchange.com/questions/5067/delegating-and-undelegating-during-the-lock-period-extends-it-for-the-initial-am){target=\_blank} **Stack Exchange** post for more information about this edge case.

## Balance Types on Polkadot.js

Expand All @@ -102,11 +102,11 @@ The following example displays the different balance types on the Polkadot.js UI

- The **bonded balance** represents the number of tokens locked for on-chain activities such as staking. In this example, the bonded balance is **0.4 KSM**

- The **democracy balance** represents the number of tokens locked for on-chain participation in governance activities, such as voting on referenda and council elections. In this example, the democracy balance is **0.4 KSM**
- The **democracy balance** represents the number of tokens locked for on-chain participation in governance activities, such as voting on referenda and council elections. In this example, the democracy balance is **0.55 KSM**

- The **redeemable balance** shows the number of tokens that have completed the unbonding period and are ready to be unlocked, becoming transferable again. In this example, the redeemable balance is **0.1 KSM**

- The **locked balance** represents the number of frozen tokens due to participation in staking, democracy, or vested transfers. **Locks do not stack**, meaning the total locked balance is determined by the largest lock, not the sum of individual locks
- The **locked balance** represents the number of locked tokens due to participation in staking, democracy, or vested transfers. **Locks do not stack**, meaning the total locked balance is determined by the largest lock, not the sum of individual locks

- The **reserved balance** represents tokens frozen for on-chain activities other than staking, governance, or vested transfers. This can include actions like setting an identity or a proxy. Reserved funds are locked due to on-chain requirements but can typically be freed by taking specific on-chain actions. For instance, the "Identity" pallet reserves funds while an on-chain identity is registered, but by clearing the identity, those funds can be unreserved and made available again. The same applies to proxies, which reserve funds due to their memory usage on the network. In this example, a governance proxy was created, and the reserved balance is 0.0668 KSM
- The **reserved balance** represents tokens locked for on-chain activities other than staking, governance, or vested transfers. This can include actions like setting an identity or a proxy. Reserved funds are locked due to on-chain requirements but can typically be freed by taking specific on-chain actions. For instance, the "Identity" pallet reserves funds while an on-chain identity is registered, but by clearing the identity, those funds can be unreserved and made available again. The same applies to proxies, which reserve funds due to their memory usage on the network. In this example, a governance proxy was created, and the reserved balance is 0.0668 KSM

0 comments on commit 76adf09

Please sign in to comment.