FeePayer

fees() modifier

MODIFIERS

==== onlyIfTest() modifier

Reverts if not running in test mode.

==== constructor(address collateralAddress, address finderAddress, bool isTest) public

Constructs the FeePayer contract. Called by child contracts.

Parameters:

  • collateralAddress: ERC20 token that is used as the underlying collateral for the synthetic.

  • finderAddress: UMA protocol Finder used to discover other protocol contracts.

  • isTest: whether this contract is being constructed for the purpose of running tests.

==== payFees() → struct FixedPoint.Unsigned totalPaid public

Pays UMA DVM regular fees to the Store contract.

These must be paid periodically for the life of the contract. If the contract has not paid its regular fee in a week or mre then a late penalty is applied which is sent to the caller.

==== _payFinalFees(address payer, struct FixedPoint.Unsigned amount) internal

Pays UMA DVM final fees to the Store contract.

This is a flat fee charged for each price request.

Parameters:

  • payer: address of who is paying the fees.

  • amount: the amount of collateral to send as the final fee.

==== pfc() → struct FixedPoint.Unsigned public

Gets the current profit from corruption for this contract in terms of the collateral currency.

Derived contracts are expected to implement this function so the payFees() method can correctly compute the owed regular fees.

==== _getStore() → contract StoreInterface internal

INTERNAL FUNCTIONS

_computeFinalFees() → struct FixedPoint.Unsigned finalFees internal

_getCollateral(struct FixedPoint.Unsigned rawCollateral) → struct FixedPoint.Unsigned collateral internal

_convertCollateral(struct FixedPoint.Unsigned collateral) → struct FixedPoint.Unsigned rawCollateral internal

_removeCollateral(struct FixedPoint.Unsigned rawCollateral, struct FixedPoint.Unsigned collateralToRemove) → struct FixedPoint.Unsigned removedCollateral internal

_addCollateral(struct FixedPoint.Unsigned rawCollateral, struct FixedPoint.Unsigned collateralToAdd) → struct FixedPoint.Unsigned addedCollateral internal

setCurrentTime(uint256 _time) external

Sets the current time.

Will revert if not running in test mode.

getCurrentTime() → uint256 public

Gets the current time. Will return the last time set in setCurrentTime if running in test mode. Otherwise, it will return the block timestamp.

© UMA Project 2018-2019