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 kSTRK to Starknet #8992

Open
9oelM opened this issue Jan 7, 2025 · 0 comments
Open

Add kSTRK to Starknet #8992

9oelM opened this issue Jan 7, 2025 · 0 comments

Comments

@9oelM
Copy link
Contributor

9oelM commented Jan 7, 2025

https://coins.llama.fi/prices/current/starknet:0x045cd05ee2caaac3459b87e5e2480099d201be2f62243f839f00e10dde7f500c

kSTRK is a liquid staking token of STRK on zkLend. Price is not supported yet on DefiLlama.

Here's how the price of kSTRK can be calculated:

Since kSTRK can be used to redeem STRK (potentially subject to a withdrawal queue delay), its price denominated in STRK can be determined from the contract as:

$\frac{\text{Total pool size in STRK}}{\text{Total kSTRK supply}}$

where

  • $\text{Total pool size in STRK}$ can be obtained by calling get_total_stake on the pool contract at 0x057ea05c22d6b162d0f2ef4b3d1e1edf3c065d81cf0f41950f716a71e9ad6bae
  • $\text{Total kSTRK supply}$ can be found by calling total_supply on the kSTRK token contract at 0x045cd05ee2caaac3459b87e5e2480099d201be2f62243f839f00e10dde7f500c

For example, querying these contracts at this moment will give 6177909955332144110523697 / 6078472178147829324439848, which is approximately 1.0163590083609817. Because its price is denominated in STRK, we multiply it with the price of STRK, which is 0.512843 right now. That gives 0.521232602924871 USD, which is the price of kSTRK.

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

No branches or pull requests

1 participant