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

Add config for nitron native apr #317

Merged
merged 6 commits into from
Jan 23, 2025
Merged

Add config for nitron native apr #317

merged 6 commits into from
Jan 23, 2025

Conversation

thanhpn
Copy link
Collaborator

@thanhpn thanhpn commented Jan 16, 2025

No description provided.

@thanhpn thanhpn requested a review from andrewsoon January 16, 2025 02:02
@@ -137,3 +138,12 @@ Each json file under the [configs](../../configs) folder correspond to their res
|`unsupported_tokens` |`string[]` |false |List of tokens that are no longer supported | The token denoms listed here **MUST** match the token denoms listed under the Carbon [Tokens API](https://api.carbon.network/carbon/coin/v1/tokens?pagination.limit=10000) |
|`temp_disabled_transfer_tokens` |`object` |false |List of tokens for which deposits and withdrawals have been temporarily disabled | The token denoms listed in this object **MUST** match the token denoms listed under the Carbon [Tokens API](https://api.carbon.network/carbon/coin/v1/tokens?pagination.limit=10000) |
|`temp_disabled_bridges` |`object` |false |List of bridges for which deposits and withdrawals have been temporarily disabled | Blockchain network listed here **MUST** match the valid chainName of the bridges listed under BridgeAll RPC call.<br /><br /> To view the values of BridgeAll RPC call, simply run yarn get-bridges [network]on the command line. Sample for mainnet:yarn get-bridges mainnet`` |


## NitronNativeAPR Data Structure
Copy link
Contributor

Choose a reason for hiding this comment

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

Rename to LST Native APR Data Structure

|Field |Type |Required |Description |Notes |
|---|---|---|---|---|
|`protocol` |`string` |true |The protocol name |
|`api_url` |`string` |true |The API URL for fetch APR info |
Copy link
Contributor

Choose a reason for hiding this comment

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

The API to fetch LST Native APR

README.md Outdated
@@ -16,6 +16,7 @@ Currently, each JSON file contain the following data on its corresponding networ
- map of IBC channels for external IBC chains (such as Osmosis, Noble, etc.)
- information about IBC tokens that are not added on chain or require packet forwarding
- default quick select tokens in deposit/withdrawal forms
- Nitron Native APR API config for get APR show on Nitron markets
Copy link
Contributor

Choose a reason for hiding this comment

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

LSTs native apr config to show on Nitron markets

|---|---|---|---|---|
|`protocol` |`string` |true |The protocol name |
|`api_url` |`string` |true |The API URL for fetch APR info |
|`reward_denom` |`object` |true |The key value object for mapping symbol and denom |
Copy link
Contributor

Choose a reason for hiding this comment

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

rename to |lst_denoms |object |true |The key value object for mapping denom of protocol api and carbon lst denom |

Comment on lines 509 to 518
"ATOM": "ibc/A4DB47A9D3CF9A068D454513891B526702455D3EF08FB9EB558C561F9DC2B701",
"OSMO": "ibc/ED07A3391A112B175915CD8FAF43A2DA8E4790EDE12566649D0C2F97716B8518",
"STARS": "ibc/C688EBE80ECC20865331A18D8D19654754F6B189977715FED00FBA2BE41F144F",
"LUNA": "ibc/2B58B8C147E8718EECCB3713271DF46DEE8A3A00A27242628604E31C2F370EF5",
"EVMOS": "ibc/35E771B8682D828173F4B795F6C307780F96DC64D6F914FAE4CC9B4666F66364",
"INJ": "ibc/CAF0C63018C2E96F320D448C1F0A1951D77C4F385D802B700CDF7DD2D5B66FD0",
"DYDX": "ibc/9DC57FF60E125F9B976EB0DF4F2122C580AD1DB8E27BA71E6D2C1AA56A5FD312",
"TIA": "ibc/2F6C349F0EB135C5FA99301758F35B87DB88403D690E5E314AB080401FEE4066E5",
"DYM": "ibc/2F50345B6B85884DC41E831047EEE01805B289171DBF105AB3EA42BCC72B3926CC",
"SAGA": "ibc/2F50345B6B85884DC41E831047EEE01805B289171DBF105AB3EA42BCC72B3926CC"
Copy link
Contributor

Choose a reason for hiding this comment

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

The denoms here for stride are wrong (checked with Joey Notion table wrong), it should be the stXX version instead
e.g.
ATOM: "ibc/B7864B03E1B9FD4F049243E92ABD691586F682137037A9F3FCA5222815620B3C"

the keys for reward_denom can keep as the key to identify the apr in the response object after querying the protocol api
e.g.
for stride API, the key is ATOM but need map to carbon stATOM denom
image

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, Let me update this table

@thanhpn thanhpn force-pushed the feat/nitron-native-apr branch from 2a660aa to 59cc762 Compare January 21, 2025 03:57
@thanhpn thanhpn requested a review from andrewsoon January 21, 2025 06:11
Copy link
Contributor

@andrewsoon andrewsoon left a comment

Choose a reason for hiding this comment

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

Add checks for valid/duplicate denoms in check_configs.ts

configs/mainnet.json Show resolved Hide resolved
@andrewsoon
Copy link
Contributor

image

when i run yarn check-configs the following errors are thrown, could u help resolve in this PR also?

@thanhpn thanhpn force-pushed the feat/nitron-native-apr branch from 59cc762 to 120d498 Compare January 23, 2025 03:42
@thanhpn thanhpn requested a review from andrewsoon January 23, 2025 03:58
@@ -30,6 +30,7 @@ Each json file under the [configs](../../configs) folder correspond to their res
|`quick_select_tokens` |`QuickSelectToken[]` |true |List of quick select tokens for deposit and withdrawal forms. |
|`disabled_transfer_banner_config` |`DisabledTransferBannerConfig` |false |Config parameters for displaying banner to inform users that transfers for the relevant tokens are disabled |
|`trading_leagues` |`TradingLeague[]` |false |Map of trading league config with their path. |
|`lst_native_aprs` |`LSTNativeAPR[]` |true |List of LST native APR APIs. |
Copy link
Contributor

Choose a reason for hiding this comment

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

the struct should be false? else it has to be included in testnet and devnet configs?

@andrewsoon andrewsoon merged commit c7d21b9 into master Jan 23, 2025
1 check passed
@andrewsoon andrewsoon deleted the feat/nitron-native-apr branch January 23, 2025 07:25
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