Skip to content

Staker API returns incorrect values #6

@ghost

Description

What's the issue?

The Staker API at https://api.fantom.network/api/v1/staker/?verbosity=2 returns incorrect values for delegatedMe and therefore totalStake for each validator.

It seems the API does not subtract delegations that have been withdrawn from this validator.

You can validate it yourself by calling the API endpoint, then check delegatedMe of e.g. validator 1:

image

and then directly get the data from the SFC smart contract by calling:

sfcContract.functions.stakers(1).call()

image

The delegatedMe value is different from the one returned from the API because the API does not account for withdrawn delegations, the SFC smart contract does.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions