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

Update balance endpoint to stardust #1312

Closed
begonaalvarezd opened this issue Dec 24, 2023 · 0 comments · Fixed by #1314
Closed

Update balance endpoint to stardust #1312

begonaalvarezd opened this issue Dec 24, 2023 · 0 comments · Fixed by #1314

Comments

@begonaalvarezd
Copy link
Member

Description

The current stardust chronicle balance endpoint returns totalBalance & sigLockedBalance, where sigLockedBalance does not provide much valuable information considering all the unlock conditions there are at the moment in stardust. Instead of sigLockedBalance I suggest adding availableBalance which considers all the unlocked outputs which have a time unlock condition and expired outputs with an expiration time unlock condition & the return address unlock condition matching the relevant address.

In the future, we might even want to add a potentialBalance that counts also for example the storage deposit unlock condition, but this needs more definition in a future balance TIP.

Motivation

In the explorer we use the balance endpoint to display the total & available balances, and at the moment sigLockedBalance is considered the available balance and that is incorrect at this moment. This issue came up very visible now after the supply increase, as there are a lot of addresses that got time locked outputs that unlock on a vesting schedule, for example, the IF address https://explorer.iota.org/mainnet/addr/iota1qp8h9augeh6tk3uvlxqfapuwv93atv63eqkpru029p6sgvr49eufyz7katr?tab=Transactions, and what the explorer now displays as available balance is incorrect, because sigLockedBalance does not take into account unlocked outputs with a time lock condition

Requirements

Open questions (optional)

Are you planning to do it yourself in a pull request?

No.

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 a pull request may close this issue.

1 participant