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

incentive APR query fix #544

Merged
merged 25 commits into from
Jun 14, 2024
Merged
Show file tree
Hide file tree
Changes from 13 commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
23e2f0c
incentive APR query fix
jelysn May 28, 2024
98de248
update apr tracking from last 24hrs data
jelysn May 30, 2024
ebf6f37
Update MaxEdenRewardAprLps to be applied on ProxyTVL instead of TVL
jelysn May 31, 2024
22f9f1b
code cleanup
jelysn May 31, 2024
1cb6b89
Add wasmbinding for leveragelp open and close estimation
jelysn Jun 3, 2024
0fa5ccb
Add CLI command for open and close estimation of leveragelp
jelysn Jun 3, 2024
5a03644
Write basic masterchef spec
jelysn Jun 4, 2024
51e563b
Write basic leveragelp spec
jelysn Jun 4, 2024
ddf85cc
cleanup endpoints data
jelysn Jun 4, 2024
a33ea04
move some contents from PR 545 - leveragelp doc
jelysn Jun 6, 2024
3f12f8f
move some contents from PR 546 - masterchef doc
jelysn Jun 6, 2024
2eb9799
add more on endpoints
jelysn Jun 6, 2024
0b34193
more details in leveragelp and masterchef spec
jelysn Jun 6, 2024
5f2612d
copy mechanism section from PR545
jelysn Jun 6, 2024
e932d55
add query and msg for leveragelp rewards
jelysn Jun 7, 2024
6c074bf
update leveragelp liquidation & stopLoss price execution flow
jelysn Jun 12, 2024
e17b6d0
.version was added
fenriz07 Jun 12, 2024
a7baaf1
deploy was added
fenriz07 Jun 12, 2024
3dd0ada
update consensus version of masterchef to prevent panic in unmarshal
jelysn Jun 13, 2024
01c135b
Merge branch 'post_v32_fix' of github.com:elys-network/elys into post…
jelysn Jun 13, 2024
ecf1021
.version was added
fenriz07 Jun 13, 2024
20b264d
Merge branch 'main' of github.com:elys-network/elys into post_v32_fix
jelysn Jun 14, 2024
1f7f6cc
v4 migration update
jelysn Jun 14, 2024
e8acac3
refactor perpetual module files to avoid too many short files
jelysn Jun 14, 2024
febe882
refactor files in perp
jelysn Jun 14, 2024
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
3 changes: 0 additions & 3 deletions config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -454,9 +454,6 @@ genesis:
- denom: "uinc"
min_amount: "1000000"
reward_portion_for_lps: "0.6"
dex_rewards_lps:
num_blocks: "1"
amount: "0"
max_eden_reward_apr_lps: "0.5"
protocol_revenue_address: "elys10d07y265gmmuvt4z0w9aw880jnsr700j6z2zm3"
chain_id: elystestnet-1
228 changes: 143 additions & 85 deletions docs/static/openapi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40775,6 +40775,56 @@ paths:
type: boolean
tags:
- Query
/elys-network/elys/leveragelp/close_estimation:
get:
summary: Get estimated amount of return value closing a position
operationId: ElysLeveragelpCloseEst
responses:
'200':
description: A successful response.
schema:
type: object
properties:
liability:
type: string
weight_balance_ratio:
type: string
amount_returned:
type: string
default:
description: An unexpected error response.
schema:
type: object
properties:
code:
type: integer
format: int32
message:
type: string
details:
type: array
items:
type: object
properties:
'@type':
type: string
additionalProperties: {}
parameters:
- name: owner
in: query
required: false
type: string
- name: id
in: query
required: false
type: string
format: uint64
- name: lp_amount
in: query
required: false
type: string
tags:
- Query
/elys-network/elys/leveragelp/is-whitelisted:
get:
summary: Queries a list of IsWhitelisted items.
Expand Down Expand Up @@ -40814,6 +40864,60 @@ paths:
type: string
tags:
- Query
/elys-network/elys/leveragelp/open_estimation:
get:
summary: Get estimated amount of return value opening a position
operationId: ElysLeveragelpOpenEst
responses:
'200':
description: A successful response.
schema:
type: object
properties:
position_size:
type: string
weight_balance_ratio:
type: string
borrow_fee:
type: string
default:
description: An unexpected error response.
schema:
type: object
properties:
code:
type: integer
format: int32
message:
type: string
details:
type: array
items:
type: object
properties:
'@type':
type: string
additionalProperties: {}
parameters:
- name: collateral_asset
in: query
required: false
type: string
- name: collateral_amount
in: query
required: false
type: string
- name: amm_pool_id
in: query
required: false
type: string
format: uint64
- name: leverage
in: query
required: false
type: string
tags:
- Query
/elys-network/elys/leveragelp/params:
get:
summary: Parameters queries the parameters of the module.
Expand Down Expand Up @@ -41865,20 +41969,6 @@ paths:
gas fees and swap fees portion for stakers, `100 -
reward_portion_for_lps - reward_portion_for_stakers =
revenue percent for protocol`.
dex_rewards_lps:
title: Tracking dex rewards given to LPs
type: object
properties:
num_blocks:
type: string
title: >-
Number of blocks since start of epoch (distribution
epoch)
amount:
type: string
title: >-
Accumulated amount at distribution epoch -
recalculated at every distribution epoch
max_eden_reward_apr_lps:
type: string
title: Maximum eden reward apr for lps - [0 - 0.3]
Expand Down Expand Up @@ -42060,28 +42150,21 @@ paths:
pool_id:
type: string
format: uint64
title: reward amount
reward_wallet:
type: string
title: reward wallet address
multiplier:
type: string
title: multiplier for lp rewards
num_blocks:
type: string
title: Block number since the creation of PoolInfo
dex_reward_amount_given:
type: string
title: Total dex rewards given
eden_reward_amount_given:
type: string
title: Total eden rewards given
eden_apr:
type: string
title: Eden APR, updated at every distribution
dex_apr:
type: string
title: Dex APR, updated at every distribution
gas_apr:
type: string
title: Gas APR, updated at every distribution
external_incentive_apr:
type: string
title: External Incentive APR, updated at every distribution
Expand All @@ -42090,7 +42173,6 @@ paths:
items:
type: string
title: external reward denoms on the pool
title: Pool Info
default:
description: An unexpected error response.
schema:
Expand Down Expand Up @@ -42928,6 +43010,10 @@ paths:
total_blocks_per_year:
type: string
format: int64
rewards_data_lifetime:
type: string
format: int64
title: default 1 day = 86400
description: >-
QueryParamsResponse is response type for the Query/Params RPC
method.
Expand Down Expand Up @@ -86712,6 +86798,15 @@ definitions:
repeated Bar results = 1;
PageResponse page = 2;
}
elys.leveragelp.QueryCloseEstResponse:
type: object
properties:
liability:
type: string
weight_balance_ratio:
type: string
amount_returned:
type: string
elys.leveragelp.QueryGetPoolResponse:
type: object
properties:
Expand All @@ -86731,6 +86826,15 @@ definitions:
type: string
leverage_max:
type: string
elys.leveragelp.QueryOpenEstResponse:
type: object
properties:
position_size:
type: string
weight_balance_ratio:
type: string
borrow_fee:
type: string
elys.leveragelp.StatusResponse:
type: object
properties:
Expand Down Expand Up @@ -86773,20 +86877,6 @@ definitions:
repeated Bar results = 1;
PageResponse page = 2;
}
elys.masterchef.DexRewardsTracker:
type: object
properties:
num_blocks:
type: string
title: Number of blocks since start of epoch (distribution epoch)
amount:
type: string
title: >-
Accumulated amount at distribution epoch - recalculated at every
distribution epoch
title: >-
DexRewardsTracker is used for tracking rewards for LPs, all amount here is
in USDC
elys.masterchef.ExternalIncentive:
type: object
properties:
Expand Down Expand Up @@ -86865,18 +86955,6 @@ definitions:
gas fees and swap fees portion for stakers, `100 -
reward_portion_for_lps - reward_portion_for_stakers = revenue percent
for protocol`.
dex_rewards_lps:
title: Tracking dex rewards given to LPs
type: object
properties:
num_blocks:
type: string
title: Number of blocks since start of epoch (distribution epoch)
amount:
type: string
title: >-
Accumulated amount at distribution epoch - recalculated at every
distribution epoch
max_eden_reward_apr_lps:
type: string
title: Maximum eden reward apr for lps - [0 - 0.3]
Expand Down Expand Up @@ -86910,28 +86988,21 @@ definitions:
pool_id:
type: string
format: uint64
title: reward amount
reward_wallet:
type: string
title: reward wallet address
multiplier:
type: string
title: multiplier for lp rewards
num_blocks:
type: string
title: Block number since the creation of PoolInfo
dex_reward_amount_given:
type: string
title: Total dex rewards given
eden_reward_amount_given:
type: string
title: Total eden rewards given
eden_apr:
type: string
title: Eden APR, updated at every distribution
dex_apr:
type: string
title: Dex APR, updated at every distribution
gas_apr:
type: string
title: Gas APR, updated at every distribution
external_incentive_apr:
type: string
title: External Incentive APR, updated at every distribution
Expand All @@ -86940,7 +87011,6 @@ definitions:
items:
type: string
title: external reward denoms on the pool
title: Pool Info
elys.masterchef.PoolMultiplier:
type: object
properties:
Expand Down Expand Up @@ -87022,18 +87092,6 @@ definitions:
gas fees and swap fees portion for stakers, `100 -
reward_portion_for_lps - reward_portion_for_stakers = revenue
percent for protocol`.
dex_rewards_lps:
title: Tracking dex rewards given to LPs
type: object
properties:
num_blocks:
type: string
title: Number of blocks since start of epoch (distribution epoch)
amount:
type: string
title: >-
Accumulated amount at distribution epoch - recalculated at
every distribution epoch
max_eden_reward_apr_lps:
type: string
title: Maximum eden reward apr for lps - [0 - 0.3]
Expand Down Expand Up @@ -87075,28 +87133,21 @@ definitions:
pool_id:
type: string
format: uint64
title: reward amount
reward_wallet:
type: string
title: reward wallet address
multiplier:
type: string
title: multiplier for lp rewards
num_blocks:
type: string
title: Block number since the creation of PoolInfo
dex_reward_amount_given:
type: string
title: Total dex rewards given
eden_reward_amount_given:
type: string
title: Total eden rewards given
eden_apr:
type: string
title: Eden APR, updated at every distribution
dex_apr:
type: string
title: Dex APR, updated at every distribution
gas_apr:
type: string
title: Gas APR, updated at every distribution
external_incentive_apr:
type: string
title: External Incentive APR, updated at every distribution
Expand All @@ -87105,7 +87156,6 @@ definitions:
items:
type: string
title: external reward denoms on the pool
title: Pool Info
elys.masterchef.QueryPoolRewardInfoResponse:
type: object
properties:
Expand Down Expand Up @@ -87613,6 +87663,10 @@ definitions:
total_blocks_per_year:
type: string
format: int64
rewards_data_lifetime:
type: string
format: int64
title: default 1 day = 86400
description: Params defines the parameters for the module.
elys.parameter.QueryParamsResponse:
type: object
Expand All @@ -87632,6 +87686,10 @@ definitions:
total_blocks_per_year:
type: string
format: int64
rewards_data_lifetime:
type: string
format: int64
title: default 1 day = 86400
description: QueryParamsResponse is response type for the Query/Params RPC method.
elys.perpetual.IsWhitelistedResponse:
type: object
Expand Down
Loading
Loading