Skip to content

Commit c3e2beb

Browse files
committed
Update vesting.mdx
1 parent 7912c79 commit c3e2beb

File tree

1 file changed

+175
-0
lines changed

1 file changed

+175
-0
lines changed

docs/develop/vesting.mdx

Lines changed: 175 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,175 @@
1+
# How vesting accounts work
2+
3+
Individuals who previously held LUNA Classic (LUNA on the original Terra blockchain) will be entitled to a specified number of LUNA tokens on the new Terra blockchain based on the quantity of their holdings at specified snapshots of time. To learn more about the Terra Ecosystem Revival Plan, please click [here](https://agora.terra.money/t/terra-ecosystem-revival-plan-2-passed-gov/18498).
4+
5+
30% of LUNA tokens received will be `liquid` and may be traded and transferred immediately upon receipt. 70% of these tokens will be `vesting`, meaning that these funds will be available in one's personal wallet, but may not be traded or transferred until a specified period of time. However, these funds may be delegated to validators at any time if the user chooses to do so.
6+
7+
Vesting tokens will be stored in a type of vesting account available in one's wallet. Vesting tokens will become `vested`, or available for trade and transfer, based on a predetermined schedule. We will go over 3 different types of vesting accounts, each with its own unique vesting schedule.
8+
9+
<div align="center">
10+
[_Continuous Vesting Account_](#continuous-vesting-account)
11+
12+
[_Periodic Vesting Account_](#periodic-vesting-account)
13+
14+
[_Delayed Vesting Account_](#delayed-vesting-account)
15+
</div>
16+
17+
One may view their respective vesting account information by adding their personal wallet address to the end of the below URL. For example, if one's personal wallet address was `terra111111111111111111111111111111111111111`, they would use the following URL to view their vesting account:
18+
19+
```
20+
https://phoenix-lcd.terra.dev/cosmos/auth/v1beta1/accounts/terra111111111111111111111111111111111111111
21+
```
22+
23+
**Note:** Token amounts in the examples below will be given in microunits. To convert microunits to basic units, you can divide the specified quantities by 1,000,000. Time values are in Unix time. You may use [this converter](https://www.epochconverter.com/) to translate from Unix time to a human-readable datetime.
24+
25+
## Continuous Vesting Account
26+
27+
In a continuous vesting account, a number of tokens will be vested per block based on a predetermined start and end time. One would have to wait until the specified start time for their tokens to start to become vested. At this point, tokens become vested per block until the end time is reached based on the following equation:
28+
29+
```python
30+
tokens_vested_per_block = int(original_vesting * (block_time / (end_time - start_time)))
31+
```
32+
33+
In the following example, 5,000,000 uLUNA (5 LUNA) will be vested within the 24-hour time period from 1654041600 Unix time (June 1, 2022 12:00:00 AM) to 1654128000 Unix time (June 2, 2022 12:00:00 AM).
34+
35+
```json
36+
{
37+
"account": {
38+
"@type": "/cosmos.vesting.v1beta1.ContinuousVestingAccount",
39+
"base_vesting_account": {
40+
"base_account": {
41+
"address": "terra111111111111111111111111111111111111111",
42+
"pub_key": null,
43+
"account_number": "0",
44+
"sequence": "0"
45+
},
46+
"original_vesting": [
47+
{
48+
"denom": "uluna",
49+
"amount": "5000000"
50+
}
51+
],
52+
"delegated_free": [],
53+
"delegated_vesting": [],
54+
"end_time": "1654128000"
55+
},
56+
"start_time": "1654041600"
57+
}
58+
}
59+
```
60+
61+
Given a block time, or the average amount of time it takes for a block to be added to the blockchain, of 6 seconds, we may calculate the number of tokens vested per block by substituting relevant variables in the `tokens_vested_per_block` equation with the specified values:
62+
63+
```python
64+
tokens_vested_per_block = int(5000000 * (6 / (1654128000 - 1654041600)))
65+
```
66+
67+
According to the above equation, ~347 uLUNA would be vested per block. Given the block time of 6 seconds and a difference between start and end time of 24 hours (86400 seconds), you may realize the total original vesting amount of 5,000,000 uLUNA utilizing the following equation:
68+
69+
```python
70+
total_vesting_tokens = tokens_vested_per_block * (86400 / 6)
71+
```
72+
73+
## Periodic Vesting Account
74+
75+
Periodic vesting accounts work similarly to continuous vesting accounts except that vesting occurs over predefined vesting periods. Each period has a specified length corresponding to the number of seconds the period will last.
76+
77+
Below, we see an example of a periodic vesting account where 5,000,000 uLUNA will be vested over the 24 hour period referenced in the continuous vesting account example. During period 1, within the first 4 hours (14,400 seconds) after the start time, 1,000,000 uLUNA will be vested. During period 2, in the 6 hours (21,600 seconds) after period 1, 2,000,000 uLUNA will be vested. Finally, during period 3, in the 14 hours (50,400 seconds) after period 2, 2,000,000 more uLUNA will be vested.
78+
79+
```json
80+
{
81+
"account": {
82+
"@type": "/cosmos.vesting.v1beta1.PeriodicVestingAccount",
83+
"base_vesting_account": {
84+
"base_account": {
85+
"address": "terra111111111111111111111111111111111111111",
86+
"pub_key": null,
87+
"account_number": "0",
88+
"sequence": "0"
89+
},
90+
"original_vesting": [
91+
{
92+
"denom": "uluna",
93+
"amount": "5000000"
94+
}
95+
],
96+
"delegated_free": [],
97+
"delegated_vesting": [],
98+
"end_time": "1654128000"
99+
},
100+
"start_time": "1654041600",
101+
"vesting_periods": [
102+
{
103+
"length": "14400",
104+
"amount": [
105+
{
106+
"denom": "uluna",
107+
"amount": "1000000"
108+
}
109+
]
110+
},
111+
{
112+
"length": "21600",
113+
"amount": [
114+
{
115+
"denom": "uluna",
116+
"amount": "2000000"
117+
}
118+
]
119+
},
120+
{
121+
"length": "50400",
122+
"amount": [
123+
{
124+
"denom": "uluna",
125+
"amount": "2000000"
126+
}
127+
]
128+
}
129+
]
130+
}
131+
}
132+
```
133+
134+
Using the equations given in the continuous vesting account example, you can evaluate the number of tokens that will be vested per block for each of the 3 periods given in our periodic vesting account example. The block times used are about 6 seconds.
135+
136+
```python
137+
tokens_vested_per_block_period1 = int(1000000 * (6 / 14400))
138+
tokens_vested_per_block_period2 = int(2000000 * (6 / 21600))
139+
tokens_vested_per_block_period3 = int(2000000 * (6 / 50400))
140+
```
141+
142+
Following the conclusion of the vesting time period given by `end_time`, 5,000,000 uLUNA will have been vested and will be available for trading and transfers.
143+
144+
## Delayed Vesting Account
145+
146+
In a delayed vesting account, vesting tokens will be fully vested when the end time is reached. In the below example, 5,000,000 uLUNA begin vesting at the genesis block. These funds remain locked until 1654041600 Unix time (June 1, 2022 12:00:00 AM), when the full amount of 5,000,000 uLUNA is then vested.
147+
148+
```json
149+
{
150+
"account": {
151+
"@type": "/cosmos.vesting.v1beta1.DelayedVestingAccount",
152+
"base_vesting_account": {
153+
"base_account": {
154+
"address": "terra111111111111111111111111111111111111111",
155+
"pub_key": null,
156+
"account_number": "0",
157+
"sequence": "0"
158+
},
159+
"original_vesting": [
160+
{
161+
"denom": "uluna",
162+
"amount": "5000000"
163+
}
164+
],
165+
"delegated_free": [],
166+
"delegated_vesting": [],
167+
"end_time": "1654041600"
168+
}
169+
}
170+
}
171+
```
172+
173+
## Delegation
174+
175+
A user may choose to delegate their tokens to validators. This may be done with tokens that are vested or are still vesting. As such, vesting tokens which are delegated will be listed under `delegated_vesting`. Vested tokens which are delegated will be listed under `delegated_free`. Both are variable values that will change based on the amount being delegated and may be updated as more and more tokens become vested. If one chooses to undelegate, the undelegated tokens will be locked for 21 days. After the 21-day period has concluded, the proportion of the funds which are vested will be free to trade and transfer as desired. Funds that are undelegated, but are still vesting will become vested based on the vesting schedule provided by its respective vesting account.

0 commit comments

Comments
 (0)