FixedPricePSM

Functions

constructor

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

Parameters

NameTypeDescription

_floor

uint256

_ceiling

uint256

_params

struct PegStabilityModule.OracleParams

_mintFeeBasisPoints

uint256

_redeemFeeBasisPoints

uint256

_reservesThreshold

uint256

_chiLimitPerSecond

uint256

_mintingBufferCap

uint256

_underlyingToken

contract IERC20

_surplusTarget

contract IPCVDeposit

_getMintAmountOut

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

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

amountIn

uint256

_getRedeemAmountOut

function _getRedeemAmountOut(
    uint256 amountChiIn
) 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

amountChiIn

uint256

Last updated