Skip to main content

FixedPricePSM

Functions

constructor

function constructor(
uint256 _floor,
uint256 _ceiling,
struct PegStabilityModule.OracleParams _params,
uint256 _mintFeeBasisPoints,
uint256 _redeemFeeBasisPoints,
uint256 _reservesThreshold,
uint256 _feiLimitPerSecond,
uint256 _mintingBufferCap,
contract IERC20 _underlyingToken,
contract IPCVDeposit _surplusTarget
) public

Parameters

NameTypeDescription
_flooruint256
_ceilinguint256
_paramsstruct PegStabilityModule.OracleParams
_mintFeeBasisPointsuint256
_redeemFeeBasisPointsuint256
_reservesThresholduint256
_feiLimitPerSeconduint256
_mintingBufferCapuint256
_underlyingTokencontract IERC20
_surplusTargetcontract IPCVDeposit

_getMintAmountOut

function _getMintAmountOut(
uint256 amountIn
) internal returns (uint256 amountFeiOut)

helper function to get mint amount out based on current market prices

will revert if price is outside of bounds and bounded PSM is being used

Parameters

NameTypeDescription
amountInuint256

_getRedeemAmountOut

function _getRedeemAmountOut(
uint256 amountFeiIn
) internal returns (uint256 amountTokenOut)

helper function to get redeem amount out based on current market prices

will revert if price is outside of bounds and bounded PSM is being used

Parameters

NameTypeDescription
amountFeiInuint256