Skip to content
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

feat: add LSM to the SDK's v0.45.16-ics-lsm branch #16747

Merged
Merged
Show file tree
Hide file tree
Changes from 57 commits
Commits
Show all changes
152 commits
Select commit Hold shift + click to select a range
00e671a
proto-gen
sampocs Jun 20, 2023
319337f
copied over staking protos
sampocs Jun 20, 2023
e81ad50
updated proto package name and fixed lint errors
sampocs Jun 20, 2023
25460ac
generated staking protos
sampocs Jun 20, 2023
01505b7
copied over module level files
sampocs Jun 20, 2023
988802b
removed min self delegation
sampocs Jun 20, 2023
b175c50
copied over staking types
sampocs Jun 20, 2023
c86a47b
copied over staking client
sampocs Jun 20, 2023
29052f5
copied over teststaking
sampocs Jun 20, 2023
b59ecbf
fixed build errors related to teststaking or min-self-delegation
sampocs Jun 20, 2023
cc8b59c
copied over staking simulation
sampocs Jun 20, 2023
0cfb4cb
copied over staking keeper
sampocs Jun 21, 2023
af19f65
removed GetLiquidDelegation
sampocs Jun 21, 2023
aa8b986
removed GetLiquidValidator
sampocs Jun 21, 2023
fd8434f
removed GetLiquidHistoricalInfo
sampocs Jun 21, 2023
b941dc8
removed GetLiquidBondedValidatorsByPower
sampocs Jun 21, 2023
38b5c5d
removed GetAllLiquidDelegations
sampocs Jun 21, 2023
c087b45
resolved batch of build errors in staking
sampocs Jun 21, 2023
7881f29
resolved batch of build errors from staking in other modules
sampocs Jun 21, 2023
c351d6d
fixed simulation tests for non-lsm txs
sampocs Jun 21, 2023
a1b58ed
misc small changes while fixing staking unit tests
sampocs Jun 21, 2023
fba2912
added back delegation_test that was removed
sampocs Jun 21, 2023
da29a2d
copied over slashing files
sampocs Jun 21, 2023
62289c7
removed/fixed tests that reference min_self_delegation
sampocs Jun 21, 2023
5743c84
fixed unit tests related to jailing a validator
sampocs Jun 22, 2023
7a79d16
fixed staking cli tests
sampocs Jun 22, 2023
35511cb
moved over distribution protos
sampocs Jun 22, 2023
6bf293a
generated distribution protos
sampocs Jun 22, 2023
dcc0582
copied over module level distribution files
sampocs Jun 22, 2023
1b74df5
copied over distribution types
sampocs Jun 22, 2023
e801f0e
copied over distribution simulation files
sampocs Jun 22, 2023
a83f0d9
copied over distribution client files
sampocs Jun 22, 2023
b861af2
copied over distribution keeper files
sampocs Jun 22, 2023
b28fafc
fixed build errors and moved withdrawal_suite into catch-all suite
sampocs Jun 22, 2023
9cf01f1
fixed distribution unit tests
sampocs Jun 22, 2023
e49b0af
added api endpoints for tokenize share queries
sampocs Jun 22, 2023
be4b680
added back in norace annotation
sampocs Jun 23, 2023
825ab95
Merge pull request #9 from iqlusioninc/sam/lsm-staking
sampocs Jun 23, 2023
2bc9256
removed min commission rate
sampocs Jun 26, 2023
be14241
added total liquid staked and tokenize share locks to genesis state
sampocs Jun 26, 2023
696e29e
added get all tokenize share locks
sampocs Jun 26, 2023
1ada588
added liquid staking data to init/export genesis
sampocs Jun 26, 2023
589252c
added unit test for init/export liquid staking genesis
sampocs Jun 26, 2023
cb150a5
stride audit fixes
sampocs Jun 26, 2023
8d59687
rename key to prefix
sampocs Jun 26, 2023
6b1dfc9
used getter for account prefix
sampocs Jun 26, 2023
36ed39a
Merge pull request #11 from iqlusioninc/sam/remove-min-commission-rate
sampocs Jun 27, 2023
3bf4bc8
Merge branch 'v0.45.16-ics-lsm' into sam/lsm-genesis
sampocs Jun 27, 2023
dc5ab59
Merge pull request #12 from iqlusioninc/sam/lsm-genesis
sampocs Jun 27, 2023
6ebf1a5
Merge branch 'v0.45.16-ics-lsm' into sam/stride-audit-fixes
sampocs Jun 27, 2023
8723b96
updated createICAAccount to closer resemble ibc code
sampocs Jun 27, 2023
5dcb6ee
Merge pull request #15 from iqlusioninc/sam/stride-audit-fixes
sampocs Jun 27, 2023
5d37c9c
fixed bug when calling BeforeTokenizeShareRecordRemoved hook
sampocs Jun 28, 2023
6158c69
flushed out lsm simulation tests
sampocs Jun 28, 2023
1b4d7e8
Merge pull request #16 from iqlusioninc/sam/lsm-sim-tests
sampocs Jun 28, 2023
a4d21b7
renamed AccountIsLiquidStakingProvider and added clarifying docstring
sampocs Jul 7, 2023
69e6bb7
added more docs to CancelUndelegation and added handler
sampocs Jul 7, 2023
750e5c4
added docstrings
sampocs Jul 7, 2023
cb57da8
removed validatorBond arg from NewDelegation
sampocs Jul 7, 2023
a063614
fixed random gen state unit tests
sampocs Jul 7, 2023
18d4262
renamed ValidatorBondDisabled to ValidatorBondCapDisabled
sampocs Jul 7, 2023
a2fa5d4
add adr + spec
riley-stride Jul 7, 2023
2496cd5
fixed bug in DecreaseValidatorBond and added unit test
sampocs Jul 7, 2023
415c00f
tweaked createICAAccount helper to be more accurate
sampocs Jul 7, 2023
6881884
passed pointer to validator in LS accounting functions and added dele…
sampocs Jul 7, 2023
97efdac
added back min-self-delegation flagged as deprecated
sampocs Jul 7, 2023
40b8762
upgrade handler and test
riley-stride Jul 8, 2023
1f1d294
correction to: added back min-self-delegation flagged as deprecated
sampocs Jul 10, 2023
6e60a2f
removed BeforeTokenizeShareRecordRemoved hook
sampocs Jul 10, 2023
ba8e4f5
updates to ADR
sampocs Jul 10, 2023
2160de7
one more change to ADR
sampocs Jul 10, 2023
22b324a
fixed unit tests around min-self-delegation
sampocs Jul 10, 2023
7aadb58
added rest endpoints to LSM queries
sampocs Jul 10, 2023
cbd11e9
fixed typo in UnbondValidator tx comment
sampocs Jul 10, 2023
a781080
removed BeforeTokenizeShareRecordRemoved hook
sampocs Jul 10, 2023
7966dd0
Merge branch 'v0.45.16-ics-lsm' into sam/lsm-distribution
sampocs Jul 10, 2023
d76b05d
Merge pull request #18 from iqlusioninc/sam/lsm-distribution
sampocs Jul 10, 2023
42be4e8
fold adr001 adr002 adr003 and marko's adr61 into a single adr
riley-stride Jul 11, 2023
95d9c92
fix merge conflicts
riley-stride Jul 11, 2023
b8d94b6
docs: clarify LSM terminology
riley-stride Jul 11, 2023
90a10d6
adr touch-ups
riley-stride Jul 11, 2023
de16d98
move adr to docs/architecture
riley-stride Jul 11, 2023
02a42df
added clarification around slash accounting
sampocs Jul 11, 2023
a118c0f
moved shares calculation under if statement in Delegate
sampocs Jul 11, 2023
370c61c
fix: add pagination to x/staking all-tokenize-share-records query
riley-stride Jul 11, 2023
4cae98e
added back in BeforeTokenizeShareRecordRemoved hook
sampocs Jul 12, 2023
fc84876
Merge branch 'v0.45.16-ics-lsm' of github.com:iqlusioninc/cosmos-sdk …
sampocs Jul 12, 2023
eeaa85e
debug print line
riley-stride Jul 13, 2023
9a80096
fix: add pagination to all-tokenize-share-records proto response
riley-stride Jul 13, 2023
eec7bca
rm upgrade handler and move migration helpers from app/upgrades to x/…
riley-stride Jul 13, 2023
f649cff
rm BeforeTokenizeShareRecordRemoved hooks
riley-stride Jul 13, 2023
bcf3697
Revert "rm upgrade handler and move migration helpers from app/upgrad…
riley-stride Jul 13, 2023
230a866
rm upgrade handler and move migration helpers from app/upgrades to x/…
riley-stride Jul 13, 2023
5e6b974
Revert "rm BeforeTokenizeShareRecordRemoved hooks"
riley-stride Jul 13, 2023
0081ec4
Revert "debug print line"
riley-stride Jul 14, 2023
ad084a4
handled rounding precision case in tokenize and redeem
sampocs Jul 14, 2023
da7f8b7
updated lsm token to map 1:1 with shares
sampocs Jul 14, 2023
f5fd65b
added unit tests around the precision error cases
sampocs Jul 14, 2023
dfaf21d
changed slashed token calculation
sampocs Jul 14, 2023
0d5a180
added lsm share token description to ADR
sampocs Jul 14, 2023
522730b
fixed bug in TokenizeShareRecordReward query
sampocs Jul 14, 2023
ce3788c
Merge pull request #20 from iqlusioninc/sam/lsm-slashed-token-adjustment
sampocs Jul 14, 2023
e81dfc9
fix: handle liquid staked coins in sim; update sim ops
MSalopek Jul 17, 2023
3de5258
test: use valoper bech prefix in sims
MSalopek Jul 17, 2023
7b4eac5
resolved conflicts with SDK 46+ protos, errors, and keys
sampocs Jul 18, 2023
aa65e67
Merge pull request #21 from MSalopek/masa/lsm-simulator-fixes
sampocs Jul 18, 2023
c65247c
shortened message names for ledger support
sampocs Jul 18, 2023
a17ee03
Merge branch 'v0.45.16-ics-lsm' of github.com:iqlusioninc/cosmos-sdk …
sampocs Jul 18, 2023
df60236
deprecated min_self_delegation in CreateValidator tx
sampocs Jul 18, 2023
0ffbbe5
validator TotalLiquidShares -> LiquidShares
sampocs Jul 19, 2023
932a971
validator TotalValidatorBondShares -> ValidatorBondShares
sampocs Jul 19, 2023
733a254
deprecated min_self_delegation in EditValidator tx
sampocs Jul 19, 2023
e731d3f
updated adr
sampocs Jul 19, 2023
60931f0
Merge branch 'v0.45.16-ics-lsm' into sam/lsm-tokens-to-shares
sampocs Jul 20, 2023
a432395
Merge pull request #19 from iqlusioninc/sam/lsm-tokens-to-shares
sampocs Jul 20, 2023
53cca31
added clarifying comment in slash panic
sampocs Jul 20, 2023
73e72b9
nit changes from latest review
sampocs Jul 20, 2023
d9e4e93
added pagination to tokenize share record query
sampocs Jul 26, 2023
2ee275d
lint/format
sampocs Jul 26, 2023
7d651a6
backported fix to #12931
sampocs Jul 26, 2023
04843f4
moved removal of tokenize share locks outside of iterator
sampocs Jul 31, 2023
3024452
removed validator pointer from liquid staking accounting functions
sampocs Jul 31, 2023
9f5ad8e
update to adr wrt purpose of tokenize share lock
sampocs Jul 31, 2023
f4ce1eb
increased validator bond shares during delegation
sampocs Aug 1, 2023
81ef370
exacerbates -> exacerbate in ADR
sampocs Aug 1, 2023
679cf5d
moved and renamed files
sampocs Aug 1, 2023
aa24023
refactored migrations
sampocs Aug 1, 2023
3082897
wired up migration
sampocs Aug 1, 2023
018ecc8
added legacy types
sampocs Aug 2, 2023
15637da
copied over test
sampocs Aug 2, 2023
47f9991
WIP: migrate to old testing framework
sampocs Aug 2, 2023
a7255b0
added validators and delegations unit tests, params test WIP
sampocs Aug 2, 2023
128be08
finished unit test for params
sampocs Aug 2, 2023
4d6ab68
Merge branch 'v0.45.16-ics-lsm' into v0.45.16-ics-lsm_upgrade-handler
sampocs Aug 3, 2023
a87d1a1
resolved conflicts
sampocs Aug 3, 2023
321f888
moved validator bond check after keeper.Delegate
sampocs Aug 3, 2023
160611e
moved validator lookup back under if statement
sampocs Aug 3, 2023
80b365e
added cancel unbonding delegation cli command
sampocs Aug 3, 2023
8f4c9dc
fixed unit test
sampocs Aug 3, 2023
aab739e
Merge pull request #25 from iqlusioninc/sam/lsm-add-cancel-unbonding-…
sampocs Aug 3, 2023
b75a00e
chore: add migrateUBDEntries to migration
riley-stride Aug 4, 2023
213f038
chore: call migrateUBDEntries from upgrade handler
riley-stride Aug 4, 2023
79044d1
test: tweak store, keys, migrations for UBD unit test
riley-stride Aug 8, 2023
0063de6
test: copy paste UBD unit test from https://github.com/cosmos/cosmos-…
riley-stride Aug 8, 2023
3d19da9
cleaned up UBD unit test and incremented consensus version
sampocs Aug 8, 2023
2967e8a
removed legacy subspace from migrator
sampocs Aug 8, 2023
63e834b
registered migration
sampocs Aug 9, 2023
0041b6a
Merge pull request #17 from iqlusioninc/v0.45.16-ics-lsm_upgrade-handler
sampocs Aug 10, 2023
ac34f8b
Merge pull request #24 from iqlusioninc/sam/lsm-update-validator-bond…
sampocs Aug 10, 2023
e633749
make format
sampocs Aug 11, 2023
846943c
increased validator bond shares during redelegation
sampocs Aug 11, 2023
c571075
increment validator bond shares in cancel unbonding
sampocs Aug 14, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion codec/amino_codec_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ func TestAminoCodecUnpackAnyFails(t *testing.T) {

func TestAminoCodecFullDecodeAndEncode(t *testing.T) {
// This tx comes from https://github.com/cosmos/cosmos-sdk/issues/8117.
txSigned := `{"type":"cosmos-sdk/StdTx","value":{"msg":[{"type":"cosmos-sdk/MsgCreateValidator","value":{"description":{"moniker":"fulltest","identity":"satoshi","website":"example.com","details":"example inc"},"commission":{"rate":"0.500000000000000000","max_rate":"1.000000000000000000","max_change_rate":"0.200000000000000000"},"min_self_delegation":"1000000","delegator_address":"cosmos14pt0q5cwf38zt08uu0n6yrstf3rndzr5057jys","validator_address":"cosmosvaloper14pt0q5cwf38zt08uu0n6yrstf3rndzr52q28gr","pubkey":{"type":"tendermint/PubKeyEd25519","value":"CYrOiM3HtS7uv1B1OAkknZnFYSRpQYSYII8AtMMtev0="},"value":{"denom":"umuon","amount":"700000000"}}}],"fee":{"amount":[{"denom":"umuon","amount":"6000"}],"gas":"160000"},"signatures":[{"pub_key":{"type":"tendermint/PubKeySecp256k1","value":"AwAOXeWgNf1FjMaayrSnrOOKz+Fivr6DiI/i0x0sZCHw"},"signature":"RcnfS/u2yl7uIShTrSUlDWvsXo2p2dYu6WJC8VDVHMBLEQZWc8bsINSCjOnlsIVkUNNe1q/WCA9n3Gy1+0zhYA=="}],"memo":"","timeout_height":"0"}}`
txSigned := `{"type":"cosmos-sdk/StdTx","value":{"msg":[{"type":"cosmos-sdk/MsgCreateValidator","value":{"description":{"moniker":"fulltest","identity":"satoshi","website":"example.com","details":"example inc"},"commission":{"rate":"0.500000000000000000","max_rate":"1.000000000000000000","max_change_rate":"0.200000000000000000"},"delegator_address":"cosmos14pt0q5cwf38zt08uu0n6yrstf3rndzr5057jys","validator_address":"cosmosvaloper14pt0q5cwf38zt08uu0n6yrstf3rndzr52q28gr","pubkey":{"type":"tendermint/PubKeyEd25519","value":"CYrOiM3HtS7uv1B1OAkknZnFYSRpQYSYII8AtMMtev0="},"value":{"denom":"umuon","amount":"700000000"}}}],"fee":{"amount":[{"denom":"umuon","amount":"6000"}],"gas":"160000"},"signatures":[{"pub_key":{"type":"tendermint/PubKeySecp256k1","value":"AwAOXeWgNf1FjMaayrSnrOOKz+Fivr6DiI/i0x0sZCHw"},"signature":"RcnfS/u2yl7uIShTrSUlDWvsXo2p2dYu6WJC8VDVHMBLEQZWc8bsINSCjOnlsIVkUNNe1q/WCA9n3Gy1+0zhYA=="}],"memo":"","timeout_height":"0"}}`
legacyCdc := simapp.MakeTestEncodingConfig().Amino
var tx legacytx.StdTx
err := legacyCdc.UnmarshalJSON([]byte(txSigned), &tx)
Expand Down
607 changes: 601 additions & 6 deletions docs/core/proto-docs.md

Large diffs are not rendered by default.

142 changes: 142 additions & 0 deletions docs/spec/lsm/adr-001.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
# ADR-001: Exempt delegations as a transitionary mechanism for safe adoption of liquid staking.
riley-stride marked this conversation as resolved.
Show resolved Hide resolved

## Context

Liquid proof of stake may exacerbates the principal agent risk that exists at the heart of the delegated proof of stake system. The core of the problem is that validators do not actually own the stake that is delegated to them. This leaves the open to perverse incentives to attack the consensus system.

Cosmos introduced the idea of min self bond in the staking. This creates a minimum amount of stake the must be bonded by the validators operator key.

This feature has very little effect on the behavior of delegates.

## Proposal:

The liquid staking system will introduce a new system. Delegator can issue a transaction that exempts their delegation to a specific validator from liquid staking. Once this transaction is issued, the SharesToToken tx will fail for the delegation.
mpoke marked this conversation as resolved.
Show resolved Hide resolved

Furthermore there will be a governance controlled parameter that will restrict the total number of tokenized shares issued for each validator by the sum of the exempt delegations multiplied by a scalar value.
mpoke marked this conversation as resolved.
Show resolved Hide resolved

For example, if governance has set value to 10. Once a delegation exempts 1000 stake from the liquid staking system, then then other delegators may chose to issue up 10,000 tokenized shares with the tokens to shares transactions.

If the maximum amount of tokenized shares are issued, the exempt delegation cannot be undelegated unless the validator chooses to leave the active validator set.


## Technical Spec

Please see this document for a full technical spec of the LSM:
https://docs.google.com/document/d/1WYPUHmQii4o-q2225D_XyqE6-1bvM7Q128Y9amqRwqY/edit#heading=h.zcpx47mn67kl
mpoke marked this conversation as resolved.
Show resolved Hide resolved

## Economics:

We expect that eventually governance may decide that the principal agent problems between validators and liquid staking are resolved through the existence of mature liquid staking synthetic asset systems and their associate risk framework. Governance can effectively disable the feature by setting the scalar value to -1 and allow unlimited minting and all exempt delegations to be freely undelegated.

During the transitionary period, this creates a market for exempt from liquid staking delegations that may serve to help further decentralize the validator set.

It also allows multiple participants in a validator business to hold their personal stakes in segregated accounts but all collectively contribute towards demonstrating alignment with the safety of the protocol.

## Software parameters

A new governance parameter is introduced that defines the ratio of exempt to issued tokenized shares. This is called the exemption factor.
mpoke marked this conversation as resolved.
Show resolved Hide resolved

## Modifying the core validator data structures

### Validator

``` proto
// Validator defines a validator, together with the total amount of the
// Validator's bond shares and their exchange rate to coins. Slashing results in
// a decrease in the exchange rate, allowing correct calculation of future
// undelegations without iterating over delegators. When coins are delegated to
// this validator, the validator is credited with a delegation whose number of
// bond shares is based on the amount of coins delegated divided by the current
// exchange rate. Voting power can be calculated as total bonded shares
// multiplied by exchange rate.
message Validator {
mpoke marked this conversation as resolved.
Show resolved Hide resolved
option (gogoproto.equal) = false;
option (gogoproto.goproto_stringer) = false;
option (gogoproto.goproto_getters) = false;

// operator_address defines the address of the validator's operator; bech encoded in JSON.
string operator_address = 1 [(gogoproto.moretags) = "yaml:\"operator_address\""];
// consensus_pubkey is the consensus public key of the validator, as a Protobuf Any.
google.protobuf.Any consensus_pubkey = 2
[(cosmos_proto.accepts_interface) = "cosmos.crypto.PubKey", (gogoproto.moretags) = "yaml:\"consensus_pubkey\""];
// jailed defined whether the validator has been jailed from bonded status or not.
bool jailed = 3;
// status is the validator status (bonded/unbonding/unbonded).
BondStatus status = 4;
// tokens define the delegated tokens (incl. self-delegation).
string tokens = 5 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.nullable) = false];
// delegator_shares defines total shares issued to a validator's delegators.
string delegator_shares = 6 [
(gogoproto.moretags) = "yaml:\"delegator_shares\"",
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec",
(gogoproto.nullable) = false
];
// description defines the description terms for the validator.
Description description = 7 [(gogoproto.nullable) = false];
// unbonding_height defines, if unbonding, the height at which this validator has begun unbonding.
int64 unbonding_height = 8 [(gogoproto.moretags) = "yaml:\"unbonding_height\""];
// unbonding_time defines, if unbonding, the min time for the validator to complete unbonding.
google.protobuf.Timestamp unbonding_time = 9
[(gogoproto.nullable) = false, (gogoproto.stdtime) = true, (gogoproto.moretags) = "yaml:\"unbonding_time\""];
// commission defines the commission parameters.
Commission commission = 10 [(gogoproto.nullable) = false];
// Number of shares marked_exempt_to_this_validator
string total_exempt_shares = 11[
(gogoproto.moretags) = "yaml:\"total_exempt_shares\"",
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec",
(gogoproto.nullable) = false
];

string total_tokenized_shares = 12[
(gogoproto.moretags) = "yaml:\"total_tokenized_shares\"",
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec",
(gogoproto.nullable) = false
]
}

```
### Delegation

```proto

// Delegation represents the bond with tokens held by an account. It is
// owned by one delegator, and is associated with the voting power of one
// validator.
message Delegation {
option (gogoproto.equal) = false;
option (gogoproto.goproto_getters) = false;
option (gogoproto.goproto_stringer) = false;

// delegator_address is the bech32-encoded address of the delegator.
string delegator_address = 1 [(gogoproto.moretags) = "yaml:\"delegator_address\""];
// validator_address is the bech32-encoded address of the validator.
string validator_address = 2 [(gogoproto.moretags) = "yaml:\"validator_address\""];
// shares define the delegation shares received.
string shares = 3 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false];
// has this delegation been marked as exempt.
bool exempt = 4
mpoke marked this conversation as resolved.
Show resolved Hide resolved
}
```
### MsgExemptDelegation

``` proto
// MsgDelegate defines a SDK message for performing a delegation of coins
// from a delegator to a validator.
message MsgExemptDelegation {
mpoke marked this conversation as resolved.
Show resolved Hide resolved
option (gogoproto.equal) = false;
option (gogoproto.goproto_getters) = false;

string delegator_address = 1 [(gogoproto.moretags) = "yaml:\"delegator_address\""];
string validator_address = 2 [(gogoproto.moretags) = "yaml:\"validator_address\""];
}

```


### Core business logic
mpoke marked this conversation as resolved.
Show resolved Hide resolved

* Remove min self delegation from the code base and all logic that uses it.
* MsgTokenizeShares must check the total exempt delegation from the validator, the governance parameter and the total tokenized shares to see if a tokenization is permitted
* MsgExemptDelegation increases the sum of total exempt delegation.
* Calls to MsgRedelegate a Delegation that is Exempt always fails.
* Calls to MsgUndelegate must check if the (exempt_shares - undelegated shares) * exemption_factor >= total_tokeniz_shares
Loading
Loading