Skip to content

chore: update staking doc#12

Merged
sainoe merged 4 commits intofeat/lsm/v0.47.xfrom
sainoe/staking-readme
Jan 9, 2024
Merged

chore: update staking doc#12
sainoe merged 4 commits intofeat/lsm/v0.47.xfrom
sainoe/staking-readme

Conversation

@sainoe
Copy link
Copy Markdown

@sainoe sainoe commented Jan 9, 2024

Description

Add missing docs in staking REAMDE, see comment.


Author Checklist

All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.

I have...

  • included the correct type prefix in the PR title
  • added ! to the type prefix if API or client breaking change
  • targeted the correct branch (see PR Targeting)
  • provided a link to the relevant issue or specification
  • followed the guidelines for building modules
  • included the necessary unit and integration tests
  • added a changelog entry to CHANGELOG.md
  • included comments for documenting Go code
  • updated the relevant documentation or specification
  • reviewed "Files changed" and left comments if necessary
  • run make lint and make test
  • confirmed all CI checks have passed

Reviewers Checklist

All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.

I have...

  • confirmed the correct type prefix in the PR title
  • confirmed ! in the type prefix if API or client breaking change
  • confirmed all author checklist items have been addressed
  • reviewed state machine logic
  • reviewed API design and naming
  • reviewed documentation is accurate
  • reviewed tests and test coverage
  • manually tested (if applicable)

@@ -1,16 +1,17 @@
# ADR ADR-061: Liquid Staking
# ADR 061: Liquid Staking Module
Copy link
Copy Markdown
Author

@sainoe sainoe Jan 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated ADR version from SDK v0.45.16-ics-lsm.

PendingTokenizeShareAuthorizations stores a queue of addresses that have their tokenize share re-enablement/unlocking in progress. When an address is enqueued, it will sit for 1 unbonding period before the tokenize share lock is removed.

```go reference
https://github.com/cosmos/cosmos-sdk/blob/v0.45.16-ics-lsm/proto/cosmos/staking/v1beta1/staking.proto#L417-L421
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update link.

* otherwise, if the `sourceValidator.Status` is not `Bonded`, and the `destinationValidator`
is `Bonded`, transfer the newly delegated tokens from the `NotBondedPool` to the `BondedPool` `ModuleAccount`
* record the token amount in an new entry in the relevant `Redelegation`
* decrement the source validator's `LiquidShares`
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add the if condition, i.e., "if delegator is a liquid staking provider"

Comment on lines +747 to +749
* if the delegation if is a validator bond, the `ValidatorBondShares` of the validator is decreased.
* if the delegator is a liquid staking provider, the `TotalLiquidStakedTokens`` increased
and the validator's `LiquidShares` is decreased.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Differentiate between the two validators.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch.

The `MsgTokenizeShares` message allows users to tokenize their delegated tokens. Share tokens have denom using the validator address and record id of the underlying delegation with the format `{validatorAddress}/{recordId}`.

```protobuf reference
https://github.com/cosmos/cosmos-sdk/blob/v0.45.16-ics-lsm/proto/cosmos/staking/v1beta1/tx.proto#L49-L50
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update link.

@sainoe sainoe merged commit d3f2a80 into feat/lsm/v0.47.x Jan 9, 2024
sainoe pushed a commit that referenced this pull request Apr 25, 2025
* chg: test new version

* chg: replace upstream
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants