euler-xyz / euler-docs

Documentation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Precision of Graph results not accurate

Kayanski opened this issue · comments

Prerequisites

Type

Something needs improving (e.g. is badly explained)

More details

Hello everyone,

I was playing with The Graph API and noticed that your The Graph doc doesn't specify the number of decimals that you use for the APY results.

It seems that the fields borrowAPY and supplyAPY have 25 decimals when expressed in percentage
(e.g. . supplyAPY: '22993951368754450778263459' <-> supplyAPY = 2.299%)

The About section at the top of the page specifies that all amounts have a precision of 1e18, but doesn't specificy the number of decimals for ratios.

Proposed solution : Add the following line in the about section

All ratios have a fixed decimal precision of 1e27.

Relevant Section(s)

https://docs.euler.finance/developers/subgraph

Assets

No response