oasisprotocol / oasisprotocol/oasis-core

Account delegations balance

Open
#3,541 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

c:client c:staking
Dominant language
Go
Stars
369
Forks
151
Avg merge
1d 3h
Merged PRs (30d)
6

Description

SUMMARY

RPC method staking.Account returns General and Escrow balances. But escrow is a balance delegated to the account and that is very confusing for users.
When a user perferoms delegation and than looks at their own balance they see for example General = 0 and Escrow = 0.
It would be good the add "Delegations" balance into the Balance struct as a sum of staking.Delegations.

ISSUE TYPE
  • Feature Idea
COMPONENT NAME

staking.Account RPC method

ADDITIONAL INFORMATION

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the staking.Account RPC method and its Balance struct, then trace how staking.Delegations are represented and calculated. The work is complete when the account response exposes a Delegations balance equal to the account’s delegated balance without obscuring existing General and Escrow values.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
api, blockchain
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.