Versions Compared

Key

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

Page Spec

Item

Content

Page URL

/discover/fio-chain/fees

Page Title

FIO Protocol - FIO Chain - Fees

Design

https://www.figma.com/file/n33HwJfIuwy068A7G0Bdpg/FIO-Website?type=design&node-id=517-3976

Section Content

Current fees

...

Although most fees are distributed within the same day, the block producer share of FIO Handle and FIO Domain registration/renewal fees are paid out over 365 days to properly incentivize block producers which will be processing bundled transactions over the full validity period.

Graphics

...

Dynamic Content

Fee amounts are dynamically set as follows

  • The above content should be static except for the fee amount column.

  • Initially set to N/A, before update runs to avoid showing incorrect fees in case fetch fails.

  • Run Get Fees (see below)

  • Match the fee based on end_point

  • Compute USD price

    • Run Get FIO Token price

Get Fees

Request

Endpoint

Code Block
POST https://fio.blockpane.com/v1/chain/get_table_rows

Body

Code Block
languagejson
{
    "json": true,
    "code": "fio.fee",
    "scope": "fio.fee",
    "table": "fiofees",
    "limit": "1000",
    "reverse": false
}

Response

rows array multiple of

Code Block
languagejson
{
	"fee_id": 0,
	"end_point": "register_fio_domain",
	"end_point_hash": "0xe7961b95f481a901b3bfa23b800c8fb3",
	"type": 0,
	"suf_amount": 1720000000000,
	"votes_pending": 1
}

end_point is the matching string

suf_amount / 1000000000 is the fee amount in FIO, show 2 decimal points

Get FIO Token price

Request

Endpoint

Code Block
https://api.coingecko.com/api/v3/simple/price?ids=fio-protocol&vs_currencies=USD

Response

Code Block
languagejson
{
    "fio-protocol": {
        "usd": 0.02060172
    }
}

Fee in USD is suf_amount / 1000000000 * usd