Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Staking Calculator

Step

Endpoint

Request

Response

User enters FIO Handle and clicks Lookup Now!

Get FIO Public Key

POST https://fio.blockpane.com/v1/chain/get_pub_address

Always same

Code Block
{
    "fio_address": "FIO Handle entered by user",
    "chain_code": "FIO",
    "token_code": "FIO"
}

Use public_address in next step

Code Block
{
    "public_address": "FIO81t9wb3849tiEBeTK1GgMqjvvwuFtZ5C6mWT6k1k2RWuQXSXcR"
}

Get Balances

POST https://fio.blockpane.com/v1/chain/get_fio_balanceAlways same

Code Block
{
  "fio_public_key": "FIO81t9wb3849tiEBeTK1GgMqjvvwuFtZ5C6mWT6k1k2RWuQXSXcR"
}
  • Use staked as Staked FIO

  • Compute Total Rewards Earned:

    • ((srps*roe)-staked)/1000000000

Code Block
{
    "balance": 5279742532709,
    "available": 4979742532709,
    "staked": 300000000000,
    "srps": 600000000000,
    "roe": "0.709415045213715"
}

If no valid response or staked is 0 display “Nothing to Display”

...