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

[Bug report] dApp staking incorrect batch construction #1338

Open
Dinonard opened this issue Jun 24, 2024 · 0 comments
Open

[Bug report] dApp staking incorrect batch construction #1338

Dinonard opened this issue Jun 24, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@Dinonard
Copy link
Member

Describe the bug

It seems there are certain scenarios where the portal doesn't correctly construct the batch call for dApp staking.

One such example is of an account YJWhHaMqUerTV3wsjQdfC9ybEBvGCoDUFqP8sVX3me8ti3v.
This is the account state at block 6409946 (Astar):
Screenshot 2024-06-24 at 14 19 32

What we can notice is:

  • account has ~702,510.26 ASTR
  • amount locked in dApp staking is 562,000.00 ASTR + 2x70,250.00 ASTR = 702,500.00 ASTR
  • this state is ok ✅

However, in the next block, a batch call is emitted to lock more funds: LINK

This should fail, but due to a bug in runtime it passes, and additional 70,250.00 ASTR are locked, resulting in user having
more locked funds than they have ASTR. This will be fixed in runtime within day(s).

However, frontend shouldn't even construct such batch.
Best case, the user should be allowed to re-lock their unlocking funds.

@Dinonard Dinonard added the bug Something isn't working label Jun 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant