Floating Incomes (fetchFloatingIncomes)
This method fetches the floating incomes of the Parabol Reserve Stability Pool (RSP).
import { ParabolServer } from "@parabolfi/server";
const parabolServer = new ParabolServer({
apiKey: process.env.PARABOL_API_KEY,
});
const incomes = await parabolServer.fetchFloatingIncomes();
Optional Parameters
chain
: The chain ID to fetch the floating incomes for. If it is not provided, the method will get the default supported chain’s floating incomes.
The floating incomes are the same for all chains for the deployed Reserve Stability Pool (RSP).
Response
{
"324": [
{
"day": 20050,
"floatingIncome": 40654777192457711,
"accFloatingIncome": 16579632845298995969
},
{
"day": 20049,
"floatingIncome": 40892032121444680,
"accFloatingIncome": 16538978068106538258
}
]
}
day
is the day of the floating income.floatingIncome
is the floating income of the day.accFloatingIncome
is the accumulated floating income of the day.
The floating incomes are updated daily at 09:10 UTC every day.
Formula
The floating income of the day is calculated by the following formula:
floatingIncome
is calculated per second and per one (1) paraUSD stablecoin.
If the floatingIncome
is 40654777192457711
and your position has 1000
paraUSD stablecoin while having 24h for the first lending day, the floating
income for the day is : 40654777192457711 * 1000e18 * 86400 / 1e25 = 351257274940000000
in wei. (0,3512572749 paraUSD bonus for the first lending
day in addition to the fixed income 💰) ~12.64% APR + fixed-rate income 🤑