@interlay/interbtc-api / Exports / DefaultFeeAPI
• new DefaultFeeAPI(api
, oracleAPI
): DefaultFeeAPI
Name | Type |
---|---|
api |
ApiPromise |
oracleAPI |
OracleAPI |
• Private
api: ApiPromise
• Private
oracleAPI: OracleAPI
▸ calculateAPY(feesWrapped
, lockedCollateral
, exchangeRate?
): Promise
<Big
>
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 |
Promise
<Big
>
The APY, given the parameters
▸ getGriefingCollateral(amount
, type
): Promise
<MonetaryAmount
<CurrencyExt
>>
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) |
Promise
<MonetaryAmount
<CurrencyExt
>>
The griefing collateral
▸ getIssueFee(): Promise
<Big
>
Promise
<Big
>
The percentage of issued token that is received by the vault as reward
▸ getIssueGriefingCollateralRate(): Promise
<Big
>
Promise
<Big
>
The griefing collateral rate for issuing InterBTC
FeeAPI.getIssueGriefingCollateralRate
▸ getReplaceGriefingCollateralRate(): Promise
<Big
>
Promise
<Big
>
The griefing collateral rate for the Vault replace request
FeeAPI.getReplaceGriefingCollateralRate