add sell and buy orders list

This commit is contained in:
João Geonizeli
2021-08-15 18:02:06 -03:00
parent 29175f14b0
commit 64bc21195c
17 changed files with 1185 additions and 235 deletions

View File

@@ -2,12 +2,19 @@ import BigNumber from "bignumber.js";
import { BLOCKS_PER_YEAR } from "../constants";
export const getApr = (
stakingTokenPrice: number,
rewardTokenPrice: number,
totalStaked: number,
tokenPerBlock: number
) => {
type Props = {
stakingTokenPrice: number;
rewardTokenPrice: number;
totalStaked: number;
tokenPerBlock: number;
};
export const getApr = ({
rewardTokenPrice,
stakingTokenPrice,
tokenPerBlock,
totalStaked,
}: Props) => {
const totalRewardPricePerYear = new BigNumber(rewardTokenPrice)
.times(tokenPerBlock)
.times(BLOCKS_PER_YEAR);