interbtc-api

@interlay/interbtc-api / Exports / FeeAPI

Interface: FeeAPI

Implemented by

Table of contents

Methods

Methods

calculateAPY

calculateAPY(feesWrapped, lockedCollateral, exchangeRate?): Promise<Big>

Parameters

Name Type Description
feesWrapped MonetaryAmount<Currency> Wrapped token fees accrued, in wrapped token (e.g. BTC)
lockedCollateral MonetaryAmount<CollateralCurrencyExt> Collateral value representing the value locked to gain yield.
exchangeRate? ExchangeRate<Currency, CollateralCurrencyExt> (Optional) Conversion rate, as a Monetary.js object

Returns

Promise<Big>

The APY, given the parameters

Defined in

src/parachain/fee.ts:36


getGriefingCollateral

getGriefingCollateral(amount, type): Promise<MonetaryAmount<CurrencyExt>>

Parameters

Name Type Description
amount MonetaryAmount<Currency> Amount, in BTC, for which to compute the required griefing collateral
type GriefingCollateralType Type of griefing collateral to compute (e.g. for issuing, replacing)

Returns

Promise<MonetaryAmount<CurrencyExt>>

The griefing collateral

Defined in

src/parachain/fee.ts:26


getIssueFee

getIssueFee(): Promise<Big>

Returns

Promise<Big>

The percentage of issued token that is received by the vault as reward

Defined in

src/parachain/fee.ts:52


getIssueGriefingCollateralRate

getIssueGriefingCollateralRate(): Promise<Big>

Returns

Promise<Big>

The griefing collateral rate for issuing InterBTC

Defined in

src/parachain/fee.ts:44


getReplaceGriefingCollateralRate

getReplaceGriefingCollateralRate(): Promise<Big>

Returns

Promise<Big>

The griefing collateral rate for the Vault replace request

Defined in

src/parachain/fee.ts:48