fees() modifier


==== nonReentrant() modifier

Prevents a contract from calling itself, directly or indirectly. Calling a nonReentrant function from another nonReentrant function is not supported. It is possible to prevent this from happening by making the nonReentrant function external, and make it call a private function that does the actual work.

==== nonReentrantView() modifier

Designed to prevent a view-only method from being re-entered during a call to a nonReentrant() state-changing method.

==== onlyIfTest() modifier

Reverts if not running in test mode.

==== constructor(address _collateralAddress, address _finderAddress, address _timerAddress) public

Constructs the FeePayer contract. Called by child contracts.


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

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

  • _timerAddress: Contract that stores the current time in a testing environment. Must be set to 0x0 for production environments that use live time.

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

Pays UMA DVM regular fees (as a % of the collateral pool) 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 more then a late penalty is applied which is sent to the caller. If the amount of fees owed are greater than the pfc, then this will pay as much as possible from the available collateral. An event is only fired if the fees charged are greater than 0.

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

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

This is equivalent to the collateral pool available from which to pay fees. Therefore, derived contracts are expected to implement this so that pay-fee methods can correctly compute the owed fees as a % of PfC.

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


_pfc() → struct FixedPoint.Unsigned internal

_getStore() → contract StoreInterface internal

_computeFinalFees() → struct FixedPoint.Unsigned finalFees internal

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

_convertToRawCollateral(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

_adjustCumulativeFeeMultiplier(struct FixedPoint.Unsigned amount, struct FixedPoint.Unsigned currentPfc) internal

_preEntranceCheck() internal

_preEntranceSet() internal

_postEntranceReset() internal

setCurrentTime(uint256 time) external

Sets the current time.

Will revert if not running in test mode.


  • time: timestamp to set current Testable time to.

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.

RegularFeesPaid(uint256 regularFee, uint256 lateFee) event


==== FinalFeesPaid(uint256 amount) event

© UMA Project 2018-2019