Skip to content

Commit

Permalink
CL: Re-design Concentrated Liquidity Module (#3296)
Browse files Browse the repository at this point in the history
* Initial commit for pool

* Fix some tests

* Fix lint

* Clean up :)

* Fixing merge conflict is fun

* Adams code review

* Code review

* lint

* lint

* remove cdc from module

* shuffle tests around

Co-authored-by: Adam Tucker <adamleetucker@outlook.com>
Co-authored-by: Roman <roman@osmosis.team>
  • Loading branch information
3 people authored Nov 22, 2022
1 parent 35fa5dd commit 66cf765
Show file tree
Hide file tree
Showing 27 changed files with 2,452 additions and 1,804 deletions.
1 change: 1 addition & 0 deletions app/keepers/keepers.go
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,7 @@ func (appKeepers *AppKeepers) InitNormalKeepers(
appKeepers.GAMMKeeper)

appKeepers.ConcentratedLiquidityKeeper = concentratedliquidity.NewKeeper(
appCodec,
appKeepers.keys[concentratedliquiditytypes.StoreKey])

appKeepers.SwapRouterKeeper = swaprouter.NewKeeper(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
syntax = "proto3";
// this is a legacy package that requires additional migration logic
// in order to use the correct packge. Decision made to use legacy package path
// This is a legacy package that requires additional migration logic
// in order to use the correct package. Decision made to use legacy package path
// until clear steps for migration logic and the unknowns for state breaking are
// investigated for changing proto package.
package osmosis.concentratedliquidity.v1beta1;

import "cosmos_proto/cosmos.proto";
import "gogoproto/gogo.proto";

option go_package = "github.com/osmosis-labs/osmosis/v13/x/concentrated-liquidity";
option go_package = "github.com/osmosis-labs/osmosis/v13/x/concentrated-liquidity/internal/model";

message Pool {
option (gogoproto.goproto_getters) = false;
Expand Down Expand Up @@ -39,24 +39,3 @@ message Pool {
(gogoproto.nullable) = false
];
}

message TickInfo {
string liquidity_gross = 1 [
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec",
(gogoproto.moretags) = "yaml:\"liquidity_gross\"",
(gogoproto.nullable) = false
];
string liquidity_net = 2 [
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec",
(gogoproto.moretags) = "yaml:\"liquidity_net\"",
(gogoproto.nullable) = false
];
}

message Position {
string liquidity = 1 [
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec",
(gogoproto.moretags) = "yaml:\"liquidity\"",
(gogoproto.nullable) = false
];
}
19 changes: 19 additions & 0 deletions proto/osmosis/concentrated-liquidity/position.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
syntax = "proto3";
// this is a legacy package that requires additional migration logic
// in order to use the correct packge. Decision made to use legacy package path
// until clear steps for migration logic and the unknowns for state breaking are
// investigated for changing proto package.
package osmosis.concentratedliquidity.v1beta1;

import "cosmos_proto/cosmos.proto";
import "gogoproto/gogo.proto";

option go_package = "github.com/osmosis-labs/osmosis/v13/x/concentrated-liquidity/internal/model";

message Position {
string liquidity = 1 [
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec",
(gogoproto.moretags) = "yaml:\"liquidity\"",
(gogoproto.nullable) = false
];
}
24 changes: 24 additions & 0 deletions proto/osmosis/concentrated-liquidity/tickInfo.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
syntax = "proto3";
// this is a legacy package that requires additional migration logic
// in order to use the correct packge. Decision made to use legacy package path
// until clear steps for migration logic and the unknowns for state breaking are
// investigated for changing proto package.
package osmosis.concentratedliquidity.v1beta1;

import "cosmos_proto/cosmos.proto";
import "gogoproto/gogo.proto";

option go_package = "github.com/osmosis-labs/osmosis/v13/x/concentrated-liquidity/internal/model";

message TickInfo {
string liquidity_gross = 1 [
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec",
(gogoproto.moretags) = "yaml:\"liquidity_gross\"",
(gogoproto.nullable) = false
];
string liquidity_net = 2 [
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec",
(gogoproto.moretags) = "yaml:\"liquidity_net\"",
(gogoproto.nullable) = false
];
}
Loading

0 comments on commit 66cf765

Please sign in to comment.