import { OracleAPI } from "./oracle"; import Big from "big.js"; import { ApiPromise } from "@polkadot/api"; import { Bitcoin, ExchangeRate, MonetaryAmount } from "@interlay/monetary-js"; import { CollateralCurrencyExt, CurrencyExt, WrappedCurrency } from "../types"; export declare enum GriefingCollateralType { Issue = 0, Replace = 1 } /** * @category BTC Bridge */ export interface FeeAPI { /** * @param amount Amount, in BTC, for which to compute the required * griefing collateral * @param collateralCurrency Currency for determining the griefing collateral * @param type Type of griefing collateral to compute (e.g. for issuing, replacing) * @returns The griefing collateral */ getGriefingCollateral(amount: MonetaryAmount, type: GriefingCollateralType): Promise>; /** * @param feesWrapped Wrapped token fees accrued, in wrapped token (e.g. BTC) * @param lockedCollateral Collateral value representing the value locked to gain yield. * @param exchangeRate (Optional) Conversion rate, as a `Monetary.js` object * @returns The APY, given the parameters */ calculateAPY(feesWrapped: MonetaryAmount, lockedCollateral: MonetaryAmount, exchangeRate?: ExchangeRate): Promise; /** * @returns The griefing collateral rate for issuing InterBTC */ getIssueGriefingCollateralRate(): Promise; /** * @returns The griefing collateral rate for the Vault replace request */ getReplaceGriefingCollateralRate(): Promise; /** * @returns The percentage of issued token that is received by the vault as reward */ getIssueFee(): Promise; } export declare class DefaultFeeAPI implements FeeAPI { private api; private oracleAPI; constructor(api: ApiPromise, oracleAPI: OracleAPI); getGriefingCollateral(amount: MonetaryAmount, type: GriefingCollateralType): Promise>; getIssueGriefingCollateralRate(): Promise; getReplaceGriefingCollateralRate(): Promise; getIssueFee(): Promise; calculateAPY(feesWrapped: MonetaryAmount, lockedCollateral: MonetaryAmount, exchangeRate?: ExchangeRate): Promise; }