Skip to main content

StoreInterface

StoreInterface#

Functions#

payOracleFees() (external)

Pays Oracle fees in ETH to the store.

To be used by contracts whose margin currency is ETH.

payOracleFeesErc20(address erc20Address, struct FixedPoint.Unsigned amount) (external)

Pays oracle fees in the margin currency, erc20Address, to the store.

To be used if the margin currency is an ERC20 token rather than ETH.

Parameters:#

  • erc20Address: address of the ERC20 token used to pay the fee.
  • amount: number of tokens to transfer. An approval for at least this amount must exist.
computeRegularFee(uint256 startTime, uint256 endTime, struct FixedPoint.Unsigned pfc) → struct FixedPoint.Unsigned regularFee, struct FixedPoint.Unsigned latePenalty (external)

Computes the regular oracle fees that a contract should pay for a period.

Parameters:#

  • startTime: defines the beginning time from which the fee is paid.
  • endTime: end time until which the fee is paid.
  • pfc: "profit from corruption", or the maximum amount of margin currency that a token sponsor could extract from the contract through corrupting the price feed in their favor.
computeFinalFee(address currency) → struct FixedPoint.Unsigned (external)

Computes the final oracle fees that a contract should pay at settlement.

Parameters:#

  • currency: token used to pay the final fee.