SDKs
to be changed with zkEVM deployment
// with npm
npm install @Phantazm/protocol-js
// or with yarn
yarn add @Phantazm/protocol-jsProtocol-js
import { v1, v2 } from '@Phantazm/protocol-js';
// returns user summary data in big units.
v1.formatUserSummaryData(
poolReservesData,
rawUserReserves,
userId,
usdPriceEth,
currentTimestamp
);
// returns user summary data in small units with 0 decimal places, except health-factor.
v1.computeRawUserSummaryData(
poolReservesData,
rawUserReserves,
userId,
usdPriceEth,
currentTimestamp
);
// returns reserves data formatted to big units.
v2.formatReserves(reserves, currentTimestamp);Rates calculation
Last updated