Prevents a contract from calling itself, directly or indirectly.
nonReentrant function from another
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.
Designed to prevent a view-only method from being re-entered during a call to a
nonReentrant() state-changing method.
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.
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.
getOutstandingRegularFees(uint256 time) → struct FixedPoint.Unsigned regularFee, struct FixedPoint.Unsigned latePenalty, struct FixedPoint.Unsigned totalPaid public
Fetch any regular fees that the contract has pending but has not yet paid. If the fees to be paid are more than the total collateral within the contract then the totalPaid returned is full contract collateral amount.
This returns 0 and exit early if there is no pfc, fees were already paid during the current block, or the fee rate is 0.
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.
Removes excess collateral balance not counted in the PfC by distributing it out pro-rata to all sponsors.
- Multiplying the
cumulativeFeeMultiplierby the ratio of non-PfC-collateral
PfC-collateral effectively pays all sponsors a pro-rata portion of the excess collateral. This will revert if PfC is 0 and this contract’s collateral balance > 0.
Sets the current time.
Will revert if not running in test mode.
time: timestamp to set current Testable time to.
Gets the current time. Will return the last time set in
setCurrentTime if running in test mode.
Otherwise, it will return the block timestamp.
A core contract method called independently or as a part of other financial contract transactions.
It pays fees and moves money between margin accounts to make sure they reflect the NAV of the contract.