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: liquidstake module #684

Merged
merged 8 commits into from
Dec 11, 2023
Merged

feat: liquidstake module #684

merged 8 commits into from
Dec 11, 2023

Conversation

xlab
Copy link
Contributor

@xlab xlab commented Dec 1, 2023

1. Overview

Adding liquidstake module that implements stkXPRT and LSM-LP flow according to FRD, BRD.

2. Implementation details

See FRD, BRD

3. How to test/use

The interchaintest for the module is part of https://github.com/persistenceOne/persistenceCore

cd persistenceCore/
make ictest-liquidstake

4. Checklist

TBD

5. Limitations

Currently StakeToLP requires a Superfluid LP CosmWasm contract deployed and set through governance.

6. Future Work

TBD

Copy link

github-actions bot commented Dec 1, 2023

Coverage after merging f/stkxprt into main

70.37%

Coverage Report
FileBranchesFuncsLinesUncovered Lines
x/liquidstakeibc
   genesis.go100%100%100%
   module.go100%100%54.76%..., 72, 73, 74, 99
   module_ibc.go100%100%8.93%..., 88, 89, 90, 91
x/liquidstakeibc/keeper
   icq.go100%100%94.70%..., 175, 39, 40, 41
   invariants.go100%100%100%
   keeper.go100%100%99.15%90, 91
   msg_server.go100%100%60.24%..., 946, 95, 96, 97
   rebalance.go100%100%91.21%..., 115, 116, 77, 80
   abci.go100%100%80.94%..., 85, 86, 87, 88
   user_unbonding.go100%100%100%
   migrations.go100%100%33.33%..., 23, 26, 27, 28
   unbonding.go100%100%100%
   ica_handlers.go100%100%29.18%..., 96, 97, 98, 99
   validator_unbonding.go100%100%100%
   ica.go100%100%65.57%..., 71, 72, 73, 74
   icq_queries.go100%100%100%
   delegation_strategy.go100%100%100%
   grpc_querier.go100%100%100%
   hooks.go100%100%43.89%..., 872, 873, 903, 904
   host_chain.go100%100%99.64%129
   ibc.go100%100%23.74%..., 91, 92, 93, 94
   redelegation.go100%100%100%
   lsm_deposit.go100%100%100%
   deposit.go100%100%100%
   redelegation_txs.go100%100%100%
x/liquidstakeibc/types
   params.go100%100%100%
   genesis.go100%100%100%
   keys.go100%100%0%..., 95, 97, 98, 99
   codec.go100%100%100%
   msgs.go100%100%91.45%..., 352, 353, 456, 457
   liquidstakeibc.go100%100%100%
   host_chain.go100%100%100%

Copy link

github-actions bot commented Dec 1, 2023

Coverage after merging f/stkxprt into main

70.37%

Coverage Report
FileBranchesFuncsLinesUncovered Lines
x/liquidstakeibc
   genesis.go100%100%100%
   module_ibc.go100%100%8.93%..., 88, 89, 90, 91
   module.go100%100%54.76%..., 72, 73, 74, 99
x/liquidstakeibc/keeper
   deposit.go100%100%100%
   validator_unbonding.go100%100%100%
   invariants.go100%100%100%
   lsm_deposit.go100%100%100%
   migrations.go100%100%33.33%..., 23, 26, 27, 28
   grpc_querier.go100%100%100%
   hooks.go100%100%43.89%..., 872, 873, 903, 904
   ica_handlers.go100%100%29.18%..., 96, 97, 98, 99
   unbonding.go100%100%100%
   user_unbonding.go100%100%100%
   icq_queries.go100%100%100%
   ica.go100%100%65.57%..., 71, 72, 73, 74
   redelegation_txs.go100%100%100%
   ibc.go100%100%23.74%..., 91, 92, 93, 94
   redelegation.go100%100%100%
   msg_server.go100%100%60.24%..., 946, 95, 96, 97
   host_chain.go100%100%99.64%129
   rebalance.go100%100%91.21%..., 115, 116, 77, 80
   delegation_strategy.go100%100%100%
   keeper.go100%100%99.15%90, 91
   icq.go100%100%94.70%..., 175, 39, 40, 41
   abci.go100%100%80.94%..., 85, 86, 87, 88
x/liquidstakeibc/types
   msgs.go100%100%91.45%..., 352, 353, 456, 457
   liquidstakeibc.go100%100%100%
   codec.go100%100%100%
   host_chain.go100%100%100%
   genesis.go100%100%100%
   keys.go100%100%0%..., 95, 97, 98, 99
   params.go100%100%100%

Copy link

github-actions bot commented Dec 2, 2023

Coverage after merging f/stkxprt into main

70.37%

Coverage Report
FileBranchesFuncsLinesUncovered Lines
x/liquidstakeibc
   genesis.go100%100%100%
   module.go100%100%54.76%..., 72, 73, 74, 99
   module_ibc.go100%100%8.93%..., 88, 89, 90, 91
x/liquidstakeibc/keeper
   ica.go100%100%65.57%..., 71, 72, 73, 74
   icq.go100%100%94.70%..., 175, 39, 40, 41
   invariants.go100%100%100%
   host_chain.go100%100%99.64%129
   msg_server.go100%100%60.24%..., 946, 95, 96, 97
   ibc.go100%100%23.74%..., 91, 92, 93, 94
   validator_unbonding.go100%100%100%
   migrations.go100%100%33.33%..., 23, 26, 27, 28
   user_unbonding.go100%100%100%
   redelegation.go100%100%100%
   lsm_deposit.go100%100%100%
   keeper.go100%100%99.15%90, 91
   unbonding.go100%100%100%
   deposit.go100%100%100%
   hooks.go100%100%43.89%..., 872, 873, 903, 904
   rebalance.go100%100%91.21%..., 115, 116, 77, 80
   abci.go100%100%80.94%..., 85, 86, 87, 88
   redelegation_txs.go100%100%100%
   ica_handlers.go100%100%29.18%..., 96, 97, 98, 99
   delegation_strategy.go100%100%100%
   grpc_querier.go100%100%100%
   icq_queries.go100%100%100%
x/liquidstakeibc/types
   msgs.go100%100%91.45%..., 352, 353, 456, 457
   codec.go100%100%100%
   keys.go100%100%0%..., 95, 97, 98, 99
   params.go100%100%100%
   genesis.go100%100%100%
   liquidstakeibc.go100%100%100%
   host_chain.go100%100%100%

Copy link

github-actions bot commented Dec 5, 2023

Coverage after merging f/stkxprt into main

70.52%

Coverage Report
FileBranchesFuncsLinesUncovered Lines
x/liquidstakeibc
   module.go100%100%54.76%..., 72, 73, 74, 99
   genesis.go100%100%100%
   module_ibc.go100%100%8.93%..., 88, 89, 90, 91
x/liquidstakeibc/keeper
   user_unbonding.go100%100%100%
   delegation_strategy.go100%100%100%
   ica_handlers.go100%100%29.18%..., 96, 97, 98, 99
   host_chain.go100%100%99.64%129
   unbonding.go100%100%100%
   abci.go100%100%80.94%..., 85, 86, 87, 88
   lsm_deposit.go100%100%100%
   keeper.go100%100%99.15%90, 91
   hooks.go100%100%44.13%..., 872, 873, 907, 908
   rebalance.go100%100%91.21%..., 115, 116, 77, 80
   ibc.go100%100%23.74%..., 91, 92, 93, 94
   ica.go100%100%65.57%..., 71, 72, 73, 74
   deposit.go100%100%100%
   migrations.go100%100%33.33%..., 23, 26, 27, 28
   invariants.go100%100%100%
   msg_server.go100%100%60.24%..., 946, 95, 96, 97
   icq.go100%100%94.70%..., 175, 39, 40, 41
   validator_unbonding.go100%100%100%
   grpc_querier.go100%100%96.57%..., 265, 266, 274, 275
   redelegation_txs.go100%100%100%
   redelegation.go100%100%100%
   icq_queries.go100%100%100%
x/liquidstakeibc/types
   msgs.go100%100%91.45%..., 352, 353, 456, 457
   keys.go100%100%0%..., 95, 97, 98, 99
   host_chain.go100%100%100%
   genesis.go100%100%100%
   params.go100%100%100%
   liquidstakeibc.go100%100%100%
   codec.go100%100%100%

@xlab xlab marked this pull request as ready for review December 5, 2023 00:32
@xlab xlab requested a review from a team as a code owner December 5, 2023 00:32
@xlab xlab requested a review from puneet2019 December 5, 2023 00:32
Copy link

github-actions bot commented Dec 5, 2023

@xlab your pull request is missing a changelog!

Copy link

github-actions bot commented Dec 5, 2023

Coverage after merging f/stkxprt into main

70.52%

Coverage Report
FileBranchesFuncsLinesUncovered Lines
x/liquidstakeibc
   module.go100%100%54.76%..., 72, 73, 74, 99
   genesis.go100%100%100%
   module_ibc.go100%100%8.93%..., 88, 89, 90, 91
x/liquidstakeibc/keeper
   ica_handlers.go100%100%29.18%..., 96, 97, 98, 99
   delegation_strategy.go100%100%100%
   ica.go100%100%65.57%..., 71, 72, 73, 74
   keeper.go100%100%99.15%90, 91
   redelegation.go100%100%100%
   unbonding.go100%100%100%
   user_unbonding.go100%100%100%
   deposit.go100%100%100%
   host_chain.go100%100%99.64%129
   redelegation_txs.go100%100%100%
   rebalance.go100%100%91.21%..., 115, 116, 77, 80
   hooks.go100%100%44.13%..., 872, 873, 907, 908
   ibc.go100%100%23.74%..., 91, 92, 93, 94
   invariants.go100%100%100%
   migrations.go100%100%33.33%..., 23, 26, 27, 28
   msg_server.go100%100%60.24%..., 946, 95, 96, 97
   grpc_querier.go100%100%96.57%..., 265, 266, 274, 275
   icq_queries.go100%100%100%
   lsm_deposit.go100%100%100%
   icq.go100%100%94.70%..., 175, 39, 40, 41
   validator_unbonding.go100%100%100%
   abci.go100%100%80.94%..., 85, 86, 87, 88
x/liquidstakeibc/types
   keys.go100%100%0%..., 95, 97, 98, 99
   host_chain.go100%100%100%
   codec.go100%100%100%
   params.go100%100%100%
   liquidstakeibc.go100%100%100%
   genesis.go100%100%100%
   msgs.go100%100%91.45%..., 352, 353, 456, 457

x/liquidstake/types/events.go Show resolved Hide resolved
x/liquidstake/keeper/rebalancing.go Show resolved Hide resolved
x/liquidstake/keeper/rebalancing.go Show resolved Hide resolved
x/liquidstake/keeper/rebalancing.go Show resolved Hide resolved
x/liquidstake/abci.go Show resolved Hide resolved
x/liquidstake/keeper/liquidstake.go Show resolved Hide resolved
x/liquidstake/keeper/liquidstake.go Show resolved Hide resolved
x/liquidstake/keeper/liquidstake.go Show resolved Hide resolved
@kruspy
Copy link
Collaborator

kruspy commented Dec 5, 2023

Great work @xlab ! Super clean and very well put together :)

@xlab xlab enabled auto-merge (squash) December 11, 2023 12:10
@xlab xlab merged commit d82b71b into main Dec 11, 2023
10 of 15 checks passed
@xlab xlab deleted the f/stkxprt branch December 11, 2023 12:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants