Fee Calculator
Inherits: IFeeCalculator
Author: Sperax Foundation
A contract that calculates fees for minting and redeeming USDs.
State Variables
LOWER_THRESHOLD
UPPER_THRESHOLD
DISCOUNT_FACTOR
PENALTY_MULTIPLIER
CALIBRATION_GAP
COLLATERAL_MANAGER
collateralFee
Functions
constructor
calibrateFee
Calibrates fee for a particular collateral
Parameters
Name
Type
Description
_collateral
address
Address of the desired collateral
getMintFee
Calculates fee to be collected for minting
Parameters
Name
Type
Description
_collateral
address
Returns
Name
Type
Description
uint256
(uint256) baseFeeIn
getRedeemFee
Calculates fee to be collected for redeeming
Parameters
Name
Type
Description
_collateral
address
Returns
Name
Type
Description
uint256
(uint256) baseFeeOut
calibrateFeeForAll
Calibrates fee for all the collaterals registered
_calibrateFee
Helper function for calibrating fee for a collateral
Parameters
Name
Type
Description
_collateral
address
Address of the desired collateral
Events
FeeCalibrated
Errors
InvalidCalibration
Structs
FeeData
Last updated