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

Max leverage #1093

Merged
merged 15 commits into from
Jan 6, 2025
Merged

Max leverage #1093

merged 15 commits into from
Jan 6, 2025

Conversation

99adarsh
Copy link
Contributor

@99adarsh 99adarsh commented Jan 2, 2025

Description

  • Added LeverageMax field in leveragelp and perpetual pool and used the pool's LeverageMax to calculate the proxyLeverage.
  • Added RPC endpoint to update the leveragelp and perpetual pool's LeverageMax field by authority.

@99adarsh 99adarsh requested a review from amityadav0 January 2, 2025 14:55
@99adarsh 99adarsh marked this pull request as draft January 2, 2025 14:55
Copy link

codecov bot commented Jan 2, 2025

Codecov Report

Attention: Patch coverage is 62.35294% with 32 lines in your changes missing coverage. Please review.

Project coverage is 45.08%. Comparing base (c3cba96) to head (b56d310).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1093      +/-   ##
==========================================
+ Coverage   45.06%   45.08%   +0.01%     
==========================================
  Files         964      967       +3     
  Lines       36943    37017      +74     
==========================================
+ Hits        16649    16688      +39     
- Misses      18989    19023      +34     
- Partials     1305     1306       +1     
Components Coverage Δ
leveragelp_transactions 75.00% <100.00%> (+1.46%) ⬆️
leveragelp_lifecycle 82.72% <ø> (ø)
leveragelp_keeper 85.41% <ø> (ø)
leveragelp_queries 8.94% <ø> (ø)
accountedpool_transactions 100.00% <ø> (ø)
accountedpool_lifecycle ∅ <ø> (∅)
accountedpool_queries 65.04% <ø> (ø)
amm_transactions 80.28% <ø> (ø)
amm_lifecycle 90.66% <ø> (ø)
amm_keeper 73.59% <ø> (ø)
amm_queries 44.75% <ø> (ø)
assetprofile_transactions 76.85% <ø> (ø)
assetprofile_lifecycle ∅ <ø> (∅)
assetprofile_keeper 80.00% <ø> (ø)
assetprofile_queries 60.00% <ø> (ø)
burner_transactions 0.00% <ø> (ø)
burner_lifecycle ∅ <ø> (∅)
burner_keeper 100.00% <ø> (ø)
burner_queries 62.01% <ø> (ø)
commitment_transactions 74.63% <ø> (ø)
commitment_lifecycle ∅ <ø> (∅)
commitment_keeper 86.17% <ø> (ø)
commitment_queries 26.53% <ø> (ø)
epochs_transactions ∅ <ø> (∅)
epochs_lifecycle 92.00% <ø> (ø)
epochs_keeper 84.61% <ø> (ø)
epochs_queries 26.78% <ø> (ø)
estaking_transactions 68.93% <ø> (ø)
estaking_lifecycle 82.60% <ø> (ø)
estaking_keeper 72.80% <ø> (ø)
estaking_queries 32.71% <ø> (ø)
incentive_transactions ∅ <ø> (∅)
incentive_lifecycle ∅ <ø> (∅)
incentive_keeper ∅ <ø> (∅)
incentive_queries ∅ <ø> (∅)
masterchef_transactions 86.85% <ø> (ø)
masterchef_lifecycle 75.43% <ø> (ø)
masterchef_keeper 100.00% <ø> (ø)
masterchef_queries 22.67% <ø> (ø)
oracle_transactions 27.27% <ø> (ø)
oracle_lifecycle 30.00% <ø> (ø)
oracle_keeper 61.11% <ø> (ø)
oracle_queries 12.73% <ø> (ø)
parameter_transactions 18.86% <ø> (ø)
parameter_lifecycle ∅ <ø> (∅)
parameter_keeper 75.00% <ø> (ø)
parameter_queries 57.14% <ø> (ø)
stablestake_transactions 81.53% <ø> (ø)
stablestake_lifecycle 100.00% <ø> (ø)
stablestake_keeper 90.47% <ø> (ø)
stablestake_queries 100.00% <ø> (ø)
perpetual_transactions 79.56% <100.00%> (+1.52%) ⬆️
perpetual_lifecycle 90.90% <ø> (ø)
perpetual_keeper 58.40% <ø> (ø)
perpetual_queries 61.40% <100.00%> (+0.08%) ⬆️
tier_transactions 100.00% <ø> (ø)
tier_lifecycle 100.00% <ø> (ø)
tier_keeper 90.90% <ø> (ø)
tier_queries 30.75% <ø> (ø)
tokenomics_transactions 71.87% <ø> (ø)
tokenomics_lifecycle ∅ <ø> (∅)
tokenomics_keeper 80.00% <ø> (ø)
tokenomics_queries 69.60% <ø> (ø)
transferhook_transactions ∅ <ø> (∅)
transferhook_lifecycle ∅ <ø> (∅)
transferhook_keeper 100.00% <ø> (ø)
transferhook_queries 11.11% <ø> (ø)
tradeshield_transactions 74.29% <ø> (ø)
tradeshield_lifecycle ∅ <ø> (∅)
tradeshield_keeper 90.90% <ø> (ø)
tradeshield_queries 21.55% <ø> (ø)

@99adarsh 99adarsh marked this pull request as ready for review January 2, 2025 19:49
@99adarsh 99adarsh requested a review from avkr003 January 2, 2025 19:49
(cosmos_proto.scalar) = "cosmos.Dec",
(gogoproto.customtype) = "cosmossdk.io/math.LegacyDec",
(gogoproto.nullable) = false
];
Copy link
Contributor

Choose a reason for hiding this comment

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

need to use legacyPool structure and migrate old pool structure

@99adarsh 99adarsh marked this pull request as draft January 3, 2025 11:06
@99adarsh 99adarsh marked this pull request as ready for review January 6, 2025 08:04
@amityadav0
Copy link
Contributor

could you please add migration script for leveragelp pools as well ?

"github.com/elys-network/elys/x/leveragelp/types"
)

// Update params through gov proposal
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
// Update params through gov proposal
// Update max leverage for a pool through gov proposal

"github.com/elys-network/elys/x/perpetual/types"
)

// Update params through gov proposal
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
// Update params through gov proposal
// Update max leverage for a pool through gov proposal

@99adarsh 99adarsh merged commit d91b0c9 into main Jan 6, 2025
75 checks passed
@99adarsh 99adarsh deleted the max-leverage branch January 6, 2025 11:11
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