-
Notifications
You must be signed in to change notification settings - Fork 262
Add the doc of resource reclamation upon undelegation #524
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add the doc of resource reclamation upon undelegation #524
Conversation
docs/mechanism-algorithm/resource.md
Outdated
| **Note**: In the TRON network, the amount of resources an account receives depends on the proportion of its TRX staked relative to the total TRX staked across the entire network. When a delegator delegates resources to a recipient, it essentially lends a portion of its own staked TRX to the recipient. In resource quota calculations, the system does not distinguish between the sources of TRX. TRX staked by the account itself and TRX delegated from other accounts are aggregated and treated uniformly as the weighting basis for resource allocation. So, unless otherwise specified, the term “staked amount” in this chapter refers to the total staked TRX of an account, including both self-staked TRX and TRX delegated from other accounts, without distinguishing their sources. | ||
| When a Delegator initiates resource delegation, a certain amount of staked TRX is lent to the Recipient, granting them the corresponding resources usage right. When the Delegator cancels the resource delegation, the system not only reclaims the corresponding staked TRX, but also reclaims a proportional amount of the Recipient’s unrecovered resources. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
granting them the corresponding resources usage right. > granting them the right to use the corresponding resources.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
docs/mechanism-algorithm/resource.md
Outdated
| × Recipient’s unrecovered resource amount | ||
| ``` | ||
| **Note**: The reclaimed unrecovered resources **must not exceed** the maximum resource capacity corresponding to the undelegated TRX amount, calculated in real time based on current network-wide staking. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
based on current network-wide staking. > based on the total network staking.
| * **Recipient's Total Staked TRX Amount for that resource**: The total staked TRX used by the recipient to obtain a specific resource (Energy or Bandwidth), including self-staked TRX (Stake 1.0 and Stake 2.0) and delegated TRX from others. This can be queried via the [wallet/getaccount](https://developers.tron.network/reference/account-getaccount#/) API. | ||
| * **Recipient's Unrecovered Resource Amount**: The amount of resources that have already been consumed and are currently in the recovery period on the recipient’s account. This can be queried via [wallet/getaccount](https://developers.tron.network/reference/account-getaccount#/) or [wallet/getaccountresource](https://developers.tron.network/reference/getaccountresource#/). | ||
| ##### 2. Account State Changes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Account State Changes > Account State Updates
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This actually describes the changes in data for both accounts, rather than an update.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see your point about 'changes' describing the data difference. However, since this section lists the formulas used to calculate the final new values (e.g., New State = Old State + xxxx), it technically describes the logic for updating the account state.
In system documentation, 'State Changes' often implies a list of xxxx (differences), whereas 'State Updates' accurately describes the mechanism of recalculating and assigning the new status. 'Updates' feels slightly more consistent with the active logic shown below
docs/mechanism-algorithm/resource.md
Outdated
| ``` | ||
| Reclaimed unrecovered resources | ||
| = (Canceled delegated TRX amount / Recipient’s total staked TRX amount for that resource) | ||
| × Recipient’s unrecovered resource amount |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"×" Recipient’s unrecovered resource amount >
"*" Recipient’s unrecovered resource amount
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
docs/mechanism-algorithm/resource.md
Outdated
| Unrecovered resource amount = Original unrecovered resource amount - Reclaimed unrecovered resource amount | ||
| ``` | ||
| **Note on Recovery:** Resources recover linearly over a **24-hour period**. If an account uses resources again or reclaims delegated resources during this period, the system performs a weighted merger of the existing recovery progress and the new recovery cycle. Consequently, the actual time remaining for resources to fully recover is usually less than 24 hours. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Delete "Consequently, the actual time remaining for resources to fully recover is usually less than 24 hours."
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
No description provided.