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 support to dec34 #1100

Open
wants to merge 25 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 22 commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
087c83b
feat: add support to dec34
cosmic-vagabond Jan 7, 2025
4f10b2e
refactor: refactor modules to support dec34
cosmic-vagabond Jan 8, 2025
cb44e75
refactor: remaining module updated to support dec64 and updated ToLeg…
cosmic-vagabond Jan 8, 2025
6b2e2aa
test: fix tests
cosmic-vagabond Jan 8, 2025
341f82e
test: fix tests
cosmic-vagabond Jan 8, 2025
8c11b8b
test: fix tests
cosmic-vagabond Jan 8, 2025
b039bec
test: fix tests
cosmic-vagabond Jan 8, 2025
0bd8b4c
fix(types): quoint64 operation
cosmic-vagabond Jan 8, 2025
b85187b
feat: add pow function to dec34 interface
cosmic-vagabond Jan 9, 2025
9ae688b
Merge branch 'main' into feat/add-support-to-dec34
cosmic-vagabond Jan 9, 2025
58c9688
refactor: pow
cosmic-vagabond Jan 9, 2025
19ecfdc
test: fix tests
cosmic-vagabond Jan 9, 2025
4333e09
refactor: move decimal normalization away from price functions
cosmic-vagabond Jan 10, 2025
b3be8c2
test(dec34): panics if wrong inputs
cosmic-vagabond Jan 14, 2025
469a186
Merge branch 'main' into feat/add-support-to-dec34
cosmic-vagabond Jan 14, 2025
7f867fd
Merge branch 'main' into feat/add-support-to-dec34
cosmic-vagabond Jan 15, 2025
1c0a41c
Merge branch 'main' into feat/add-support-to-dec34
cosmic-vagabond Jan 15, 2025
a009a3a
test(perpetual): fix tests
cosmic-vagabond Jan 15, 2025
afebdaf
test: debug
cosmic-vagabond Jan 15, 2025
9e96166
feat(dec34): add ceil method
cosmic-vagabond Jan 15, 2025
787d233
test(perpetual): fix tests
cosmic-vagabond Jan 15, 2025
943726d
Merge branch 'main' into feat/add-support-to-dec34
cosmic-vagabond Jan 17, 2025
c3eba57
refactor: move division op to get asset price from denom
cosmic-vagabond Jan 25, 2025
6ae7f83
Merge branch 'main' into feat/add-support-to-dec34
cosmic-vagabond Jan 25, 2025
b83276a
Merge branch 'main' into feat/add-support-to-dec34
cosmic-vagabond Jan 27, 2025
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
588 changes: 280 additions & 308 deletions api/elys/amm/query.pulsar.go

Large diffs are not rendered by default.

207 changes: 102 additions & 105 deletions api/elys/amm/tx.pulsar.go

Large diffs are not rendered by default.

519 changes: 255 additions & 264 deletions api/elys/leveragelp/query.pulsar.go

Large diffs are not rendered by default.

558 changes: 260 additions & 298 deletions api/elys/masterchef/query.pulsar.go

Large diffs are not rendered by default.

595 changes: 291 additions & 304 deletions api/elys/perpetual/query.pulsar.go

Large diffs are not rendered by default.

577 changes: 260 additions & 317 deletions api/elys/tier/query.pulsar.go

Large diffs are not rendered by default.

7 changes: 5 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ require (
cloud.google.com/go/compute/metadata v0.5.0 // indirect
cloud.google.com/go/iam v1.1.9 // indirect
cloud.google.com/go/storage v1.41.0 // indirect
github.com/gogo/protobuf v1.3.3 // indirect
github.com/golang/protobuf v1.5.4
github.com/grpc-ecosystem/grpc-gateway v1.16.0
google.golang.org/genproto v0.0.0-20240701130421-f6361c86f094 // indirect
Expand All @@ -48,10 +49,12 @@ require (

require (
github.com/bufbuild/buf v1.15.1
github.com/cockroachdb/apd/v2 v2.0.2
github.com/cosmos/cosmos-proto v1.0.0-beta.5
github.com/cosmos/ibc-apps/modules/ibc-hooks/v8 v8.0.0-20240904212233-8cb681e31589
github.com/google/uuid v1.6.0
github.com/grpc-ecosystem/grpc-gateway/v2 v2.11.3
github.com/regen-network/regen-ledger/types/v2 v2.3.1
golang.org/x/tools v0.22.0
google.golang.org/genproto/googleapis/api v0.0.0-20240814211410-ddb44dafa142
google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0
Expand Down Expand Up @@ -82,7 +85,6 @@ require (
github.com/cenkalti/backoff/v4 v4.3.0 // indirect
github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/chzyer/readline v1.5.1 // indirect
github.com/cockroachdb/apd/v2 v2.0.2 // indirect
github.com/cockroachdb/errors v1.11.3 // indirect
github.com/cockroachdb/fifo v0.0.0-20240606204812-0bbfbd93a7ce // indirect
github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect
Expand Down Expand Up @@ -131,7 +133,6 @@ require (
github.com/gofrs/flock v0.8.1 // indirect
github.com/gofrs/uuid/v5 v5.0.0 // indirect
github.com/gogo/googleapis v1.4.1 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/glog v1.2.2 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/mock v1.6.0 // indirect
Expand Down Expand Up @@ -261,6 +262,8 @@ replace (

// TODO Remove it: https://github.com/cosmos/cosmos-sdk/issues/10409
github.com/gin-gonic/gin => github.com/gin-gonic/gin v1.8.1

github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1
// replace broken goleveldb
github.com/syndtr/goleveldb => github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7
)
16 changes: 5 additions & 11 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1647,14 +1647,6 @@ github.com/gogo/googleapis v1.4.0/go.mod h1:5YRNX2z1oM5gXdAkurHa942MDgEJyk02w4Oe
github.com/gogo/googleapis v1.4.1-0.20201022092350-68b0159b7869/go.mod h1:5YRNX2z1oM5gXdAkurHa942MDgEJyk02w4OecKY87+c=
github.com/gogo/googleapis v1.4.1 h1:1Yx4Myt7BxzvUr5ldGSbwYiZG6t9wGBZ+8/fX3Wvtq0=
github.com/gogo/googleapis v1.4.1/go.mod h1:2lpHqI5OcWCtVElxXnPt+s8oJvMpySlOyM6xDCrzib4=
github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4=
github.com/gogo/protobuf v1.2.2-0.20190723190241-65acae22fc9d/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o=
github.com/gogo/protobuf v1.3.0/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o=
github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o=
github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q=
github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q=
github.com/gogo/status v1.1.0/go.mod h1:BFv9nrluPLmrS0EmGVvLaPNmRosr9KapBYd5/hpY1WM=
github.com/golang-jwt/jwt v3.2.2+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I=
github.com/golang-jwt/jwt/v4 v4.0.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg=
Expand Down Expand Up @@ -2183,8 +2175,6 @@ github.com/kataras/sitemap v0.0.6/go.mod h1:dW4dOCNs896OR1HmG+dMLdT7JjDk7mYBzoIR
github.com/kataras/tunnel v0.0.4/go.mod h1:9FkU4LaeifdMWqZu7o20ojmW4B7hdhv2CMLwfnHGpYw=
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8=
github.com/kevinburke/ssh_config v1.2.0/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM=
github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q=
github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00=
github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8=
github.com/kisielk/errcheck v1.6.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8=
github.com/kisielk/errcheck v1.6.2/go.mod h1:nXw/i/MfnvRHqXa7XXmQMUB0oNFGuBrNI8d8NLy0LPw=
Expand Down Expand Up @@ -2787,6 +2777,10 @@ github.com/rcrowley/go-metrics v0.0.0-20200313005456-10cdbea86bc0/go.mod h1:bCqn
github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 h1:N/ElC8H3+5XpJzTSTfLsJV/mx9Q9g7kxmchpfZyxgzM=
github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4=
github.com/regen-network/gocuke v0.6.2/go.mod h1:zYaqIHZobHyd0xOrHGPQjbhGJsuZ1oElx150u2o1xuk=
github.com/regen-network/protobuf v1.3.3-alpha.regen.1 h1:OHEc+q5iIAXpqiqFKeLpu5NwTIkVXUs48vFMwzqpqY4=
github.com/regen-network/protobuf v1.3.3-alpha.regen.1/go.mod h1:2DjTFR1HhMQhiWC5sZ4OhQ3+NtdbZ6oBDKQwq5Ou+FI=
github.com/regen-network/regen-ledger/types/v2 v2.3.1 h1:PeO0O4xsGrIZWl6jjBlqddFIDU+wFkaUu5Ygp30PbBw=
github.com/regen-network/regen-ledger/types/v2 v2.3.1/go.mod h1:h2pp1rYMAHwLuTet6XJVI6fX2lpvpiSoJVrEFfzK9n8=
github.com/remyoudompheng/bigfft v0.0.0-20170806203942-52369c62f446/go.mod h1:uYEyJGbgTkfkS4+E/PavXkNJcbFIpEtjt2B0KDQ5+9M=
github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo=
github.com/remyoudompheng/go-dbus v0.0.0-20121104212943-b7232d34b1d5/go.mod h1:+u151txRmLpwxBmpYn9z3d1sdJdjRPQpsXuYeY9jNls=
Expand Down Expand Up @@ -3892,7 +3886,6 @@ golang.org/x/tools v0.0.0-20180525024113-a5b4c53f6e8b/go.mod h1:n7NCudcB/nEzxVGm
golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20181011042414-1f849cf54d09/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20181117154741-2ddaf7f79a09/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20181219222714-6e267b5cc78e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20181221001348-537d06c36207/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
Expand Down Expand Up @@ -4164,6 +4157,7 @@ google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfG
google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
google.golang.org/genproto v0.0.0-20200324203455-a04cca1dde73/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
google.golang.org/genproto v0.0.0-20200423170343-7949de9c1215/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
Expand Down
54 changes: 9 additions & 45 deletions proto/elys/amm/query.proto
Original file line number Diff line number Diff line change
Expand Up @@ -157,16 +157,8 @@ message QueryJoinPoolEstimationResponse {
[ (gogoproto.nullable) = false ];
repeated cosmos.base.v1beta1.Coin amounts_in = 2
[ (gogoproto.nullable) = false ];
string slippage = 3 [
(cosmos_proto.scalar) = "cosmos.Dec",
(gogoproto.customtype) = "cosmossdk.io/math.LegacyDec",
(gogoproto.nullable) = false
];
string weight_balance_ratio = 4 [
(cosmos_proto.scalar) = "cosmos.Dec",
(gogoproto.customtype) = "cosmossdk.io/math.LegacyDec",
(gogoproto.nullable) = false
];
string slippage = 3;
string weight_balance_ratio = 4;
}

message QueryExitPoolEstimationRequest {
Expand All @@ -185,11 +177,7 @@ message QueryExitPoolEstimationResponse {
}

message QuerySwapEstimationResponse {
string spot_price = 1 [
(cosmos_proto.scalar) = "cosmos.Dec",
(gogoproto.customtype) = "cosmossdk.io/math.LegacyDec",
(gogoproto.nullable) = false
];
string spot_price = 1;
cosmos.base.v1beta1.Coin token_out = 2 [ (gogoproto.nullable) = false ];
string swap_fee = 3 [
(cosmos_proto.scalar) = "cosmos.Dec",
Expand All @@ -203,16 +191,8 @@ message QuerySwapEstimationResponse {
];
cosmos.base.v1beta1.Coin available_liquidity = 5
[ (gogoproto.nullable) = false ];
string slippage = 6 [
(cosmos_proto.scalar) = "cosmos.Dec",
(gogoproto.customtype) = "cosmossdk.io/math.LegacyDec",
(gogoproto.nullable) = false
];
string weight_balance_ratio = 7 [
(cosmos_proto.scalar) = "cosmos.Dec",
(gogoproto.customtype) = "cosmossdk.io/math.LegacyDec",
(gogoproto.nullable) = false
];
string slippage = 6;
string weight_balance_ratio = 7;
}

message QuerySlippageTrackRequest { uint64 pool_id = 1; }
Expand Down Expand Up @@ -262,11 +242,7 @@ message QuerySwapEstimationByDenomRequest {
message QuerySwapEstimationByDenomResponse {
repeated SwapAmountInRoute in_route = 1;
repeated SwapAmountOutRoute out_route = 2;
string spot_price = 3 [
(cosmos_proto.scalar) = "cosmos.Dec",
(gogoproto.customtype) = "cosmossdk.io/math.LegacyDec",
(gogoproto.nullable) = false
];
string spot_price = 3;
cosmos.base.v1beta1.Coin amount = 4 [ (gogoproto.nullable) = false ];
string swap_fee = 5 [
(cosmos_proto.scalar) = "cosmos.Dec",
Expand All @@ -280,21 +256,9 @@ message QuerySwapEstimationByDenomResponse {
];
cosmos.base.v1beta1.Coin available_liquidity = 7
[ (gogoproto.nullable) = false ];
string weight_balance_ratio = 8 [
(cosmos_proto.scalar) = "cosmos.Dec",
(gogoproto.customtype) = "cosmossdk.io/math.LegacyDec",
(gogoproto.nullable) = false
];
string slippage = 9 [
(cosmos_proto.scalar) = "cosmos.Dec",
(gogoproto.customtype) = "cosmossdk.io/math.LegacyDec",
(gogoproto.nullable) = false
];
string price_impact = 10 [
(cosmos_proto.scalar) = "cosmos.Dec",
(gogoproto.customtype) = "cosmossdk.io/math.LegacyDec",
(gogoproto.nullable) = false
];
string weight_balance_ratio = 8;
string slippage = 9;
string price_impact = 10;
}

message QueryAMMPriceRequest {
Expand Down
6 changes: 1 addition & 5 deletions proto/elys/amm/tx.proto
Original file line number Diff line number Diff line change
Expand Up @@ -201,11 +201,7 @@ message MsgSwapByDenomResponse {
cosmos.base.v1beta1.Coin amount = 1 [ (gogoproto.nullable) = false ];
repeated SwapAmountInRoute in_route = 2;
repeated SwapAmountOutRoute out_route = 3;
string spot_price = 4 [
(cosmos_proto.scalar) = "cosmos.Dec",
(gogoproto.customtype) = "cosmossdk.io/math.LegacyDec",
(gogoproto.nullable) = false
];
string spot_price = 4;
avkr003 marked this conversation as resolved.
Show resolved Hide resolved
string swap_fee = 5 [
(cosmos_proto.scalar) = "cosmos.Dec",
(gogoproto.customtype) = "cosmossdk.io/math.LegacyDec",
Expand Down
20 changes: 3 additions & 17 deletions proto/elys/leveragelp/query.proto
Original file line number Diff line number Diff line change
Expand Up @@ -196,13 +196,7 @@ message QueryLiquidationPriceRequest {
uint64 position_id = 2;
}

message QueryLiquidationPriceResponse {
string price = 1 [
(cosmos_proto.scalar) = "cosmos.Dec",
(gogoproto.customtype) = "cosmossdk.io/math.LegacyDec",
(gogoproto.nullable) = false
];
}
message QueryLiquidationPriceResponse { string price = 1; }

message QueryOpenEstRequest {
string collateral_asset = 1;
Expand All @@ -225,11 +219,7 @@ message QueryOpenEstResponse {
(gogoproto.customtype) = "cosmossdk.io/math.Int",
(gogoproto.nullable) = false
];
string weight_balance_ratio = 2 [
(cosmos_proto.scalar) = "cosmos.Dec",
(gogoproto.customtype) = "cosmossdk.io/math.LegacyDec",
(gogoproto.nullable) = false
];
string weight_balance_ratio = 2;
string borrow_fee = 3 [
(cosmos_proto.scalar) = "cosmos.Dec",
(gogoproto.customtype) = "cosmossdk.io/math.LegacyDec",
Expand Down Expand Up @@ -274,11 +264,7 @@ message QueryCloseEstResponse {
(gogoproto.customtype) = "cosmossdk.io/math.Int",
(gogoproto.nullable) = false
];
string weight_balance_ratio = 2 [
(cosmos_proto.scalar) = "cosmos.Dec",
(gogoproto.customtype) = "cosmossdk.io/math.LegacyDec",
(gogoproto.nullable) = false
];
string weight_balance_ratio = 2;
string amount_returned = 3 [
(cosmos_proto.scalar) = "cosmos.Int",
(gogoproto.customtype) = "cosmossdk.io/math.Int",
Expand Down
76 changes: 12 additions & 64 deletions proto/elys/masterchef/query.proto
Original file line number Diff line number Diff line change
Expand Up @@ -206,13 +206,7 @@ message QueryUserPendingRewardResponse {

message QueryStableStakeAprRequest { string denom = 1; }

message QueryStableStakeAprResponse {
string apr = 1 [
(cosmos_proto.scalar) = "cosmos.Dec",
(gogoproto.customtype) = "cosmossdk.io/math.LegacyDec",
(gogoproto.nullable) = false
];
}
message QueryStableStakeAprResponse { string apr = 1; }

message QueryPoolAprsRequest { repeated uint64 pool_ids = 1; }

Expand Down Expand Up @@ -256,67 +250,21 @@ message QueryAprRequest {
string denom = 2;
}

message QueryAprResponse {
string apr = 1 [
(cosmos_proto.scalar) = "cosmos.Dec",
(gogoproto.customtype) = "cosmossdk.io/math.LegacyDec",
(gogoproto.nullable) = false
];
}
message QueryAprResponse { string apr = 1; }

message QueryAprsRequest {}

message QueryAprsResponse {
string usdc_apr_usdc = 1 [
(cosmos_proto.scalar) = "cosmos.Dec",
(gogoproto.customtype) = "cosmossdk.io/math.LegacyDec",
(gogoproto.nullable) = false
];
string eden_apr_usdc = 2 [
(cosmos_proto.scalar) = "cosmos.Dec",
(gogoproto.customtype) = "cosmossdk.io/math.LegacyDec",
(gogoproto.nullable) = false
];
string usdc_apr_edenb = 3 [
(cosmos_proto.scalar) = "cosmos.Dec",
(gogoproto.customtype) = "cosmossdk.io/math.LegacyDec",
(gogoproto.nullable) = false
];
string eden_apr_edenb = 4 [
(cosmos_proto.scalar) = "cosmos.Dec",
(gogoproto.customtype) = "cosmossdk.io/math.LegacyDec",
(gogoproto.nullable) = false
];
string usdc_apr_eden = 5 [
(cosmos_proto.scalar) = "cosmos.Dec",
(gogoproto.customtype) = "cosmossdk.io/math.LegacyDec",
(gogoproto.nullable) = false
];
string eden_apr_eden = 6 [
(cosmos_proto.scalar) = "cosmos.Dec",
(gogoproto.customtype) = "cosmossdk.io/math.LegacyDec",
(gogoproto.nullable) = false
];
string edenb_apr_eden = 7 [
(cosmos_proto.scalar) = "cosmos.Dec",
(gogoproto.customtype) = "cosmossdk.io/math.LegacyDec",
(gogoproto.nullable) = false
];
string usdc_apr_elys = 8 [
(cosmos_proto.scalar) = "cosmos.Dec",
(gogoproto.customtype) = "cosmossdk.io/math.LegacyDec",
(gogoproto.nullable) = false
];
string eden_apr_elys = 9 [
(cosmos_proto.scalar) = "cosmos.Dec",
(gogoproto.customtype) = "cosmossdk.io/math.LegacyDec",
(gogoproto.nullable) = false
];
string edenb_apr_elys = 10 [
(cosmos_proto.scalar) = "cosmos.Dec",
(gogoproto.customtype) = "cosmossdk.io/math.LegacyDec",
(gogoproto.nullable) = false
];
string usdc_apr_usdc = 1;
string eden_apr_usdc = 2;
string usdc_apr_edenb = 3;
string eden_apr_edenb = 4;
string usdc_apr_eden = 5;
string eden_apr_eden = 6;
string edenb_apr_eden = 7;
string usdc_apr_elys = 8;
string eden_apr_elys = 9;
string edenb_apr_elys = 10;
}

message QueryPoolRewardsRequest {
Expand Down
24 changes: 4 additions & 20 deletions proto/elys/perpetual/query.proto
Original file line number Diff line number Diff line change
Expand Up @@ -280,11 +280,7 @@ message QueryOpenEstimationResponse {
cosmos.base.v1beta1.Coin estimated_pnl = 10 [ (gogoproto.nullable) = false ];
cosmos.base.v1beta1.Coin available_liquidity = 11
[ (gogoproto.nullable) = false ];
string slippage = 12 [
(cosmos_proto.scalar) = "cosmos.Dec",
(gogoproto.customtype) = "cosmossdk.io/math.LegacyDec",
(gogoproto.nullable) = false
];
string slippage = 12;
string borrow_interest_rate = 13 [
(cosmos_proto.scalar) = "cosmos.Dec",
(gogoproto.customtype) = "cosmossdk.io/math.LegacyDec",
Expand All @@ -307,11 +303,7 @@ message QueryOpenEstimationResponse {
(gogoproto.customtype) = "cosmossdk.io/math.LegacyDec",
(gogoproto.nullable) = false
];
string weight_breaking_fee = 19 [
(cosmos_proto.scalar) = "cosmos.Dec",
(gogoproto.customtype) = "cosmossdk.io/math.LegacyDec",
(gogoproto.nullable) = false
];
string weight_breaking_fee = 19;
}

message PoolResponse {
Expand Down Expand Up @@ -414,14 +406,6 @@ message QueryCloseEstimationResponse {
];
cosmos.base.v1beta1.Coin custody = 11 [ (gogoproto.nullable) = false ];
cosmos.base.v1beta1.Coin collateral = 12 [ (gogoproto.nullable) = false ];
string weight_breaking_fee = 13 [
(cosmos_proto.scalar) = "cosmos.Dec",
(gogoproto.customtype) = "cosmossdk.io/math.LegacyDec",
(gogoproto.nullable) = false
];
string slippage = 14 [
(cosmos_proto.scalar) = "cosmos.Dec",
(gogoproto.customtype) = "cosmossdk.io/math.LegacyDec",
(gogoproto.nullable) = false
];
string weight_breaking_fee = 13;
string slippage = 14;
}
Loading
Loading