PerpsV2Settings¶
Description¶
Source: contracts/PerpsV2Settings.sol
Variables¶
CONTRACT_NAME
¶
Type: bytes32
Constructor¶
constructor
¶
Details
Signature
constructor(address _owner, address _resolver)
Visibility
public
State Mutability
``
Views¶
baseFee
¶
Details
Signature
baseFee(bytes32 _marketKey) view returns (uint256)
Visibility
external
State Mutability
view
baseFeeNextPrice
¶
Details
Signature
baseFeeNextPrice(bytes32 _marketKey) view returns (uint256)
Visibility
external
State Mutability
view
liquidationBufferRatio
¶
Details
Signature
liquidationBufferRatio() view returns (uint256)
Visibility
external
State Mutability
view
liquidationFeeRatio
¶
Details
Signature
liquidationFeeRatio() view returns (uint256)
Visibility
external
State Mutability
view
maxFundingRate
¶
Details
Signature
maxFundingRate(bytes32 _marketKey) view returns (uint256)
Visibility
public
State Mutability
view
maxLeverage
¶
Details
Signature
maxLeverage(bytes32 _marketKey) view returns (uint256)
Visibility
public
State Mutability
view
maxSingleSideValueUSD
¶
Details
Signature
maxSingleSideValueUSD(bytes32 _marketKey) view returns (uint256)
Visibility
public
State Mutability
view
minInitialMargin
¶
Details
Signature
minInitialMargin() view returns (uint256)
Visibility
external
State Mutability
view
minKeeperFee
¶
Details
Signature
minKeeperFee() view returns (uint256)
Visibility
external
State Mutability
view
nextPriceConfirmWindow
¶
Details
Signature
nextPriceConfirmWindow(bytes32 _marketKey) view returns (uint256)
Visibility
public
State Mutability
view
parameters
¶
Details
Signature
parameters(bytes32 _marketKey) view returns (uint256 baseFee, uint256 baseFeeNextPrice, uint256 nextPriceConfirmWindow, uint256 maxLeverage, uint256 maxSingleSideValueUSD, uint256 maxFundingRate, uint256 skewScaleUSD)
Visibility
external
State Mutability
view
resolverAddressesRequired
¶
Details
Signature
resolverAddressesRequired() view returns (bytes32[] addresses)
Visibility
public
State Mutability
view
skewScaleUSD
¶
Details
Signature
skewScaleUSD(bytes32 _marketKey) view returns (uint256)
Visibility
public
State Mutability
view
Restricted Functions¶
setBaseFee
¶
Details
Signature
setBaseFee(bytes32 _marketKey, uint256 _baseFee)
Visibility
public
State Mutability
``
Requires
Modifiers
setBaseFeeNextPrice
¶
Details
Signature
setBaseFeeNextPrice(bytes32 _marketKey, uint256 _baseFeeNextPrice)
Visibility
public
State Mutability
``
Requires
Modifiers
setLiquidationBufferRatio
¶
Details
Signature
setLiquidationBufferRatio(uint256 _ratio)
Visibility
external
State Mutability
``
Modifiers
Emits
setLiquidationFeeRatio
¶
Details
Signature
setLiquidationFeeRatio(uint256 _ratio)
Visibility
external
State Mutability
``
Modifiers
Emits
setMaxFundingRate
¶
Details
Signature
setMaxFundingRate(bytes32 _marketKey, uint256 _maxFundingRate)
Visibility
public
State Mutability
``
Modifiers
setMaxLeverage
¶
Details
Signature
setMaxLeverage(bytes32 _marketKey, uint256 _maxLeverage)
Visibility
public
State Mutability
``
Modifiers
setMaxSingleSideValueUSD
¶
Details
Signature
setMaxSingleSideValueUSD(bytes32 _marketKey, uint256 _maxSingleSideValueUSD)
Visibility
public
State Mutability
``
Modifiers
setMinInitialMargin
¶
Details
Signature
setMinInitialMargin(uint256 _minMargin)
Visibility
external
State Mutability
``
Requires
Modifiers
Emits
setMinKeeperFee
¶
Details
Signature
setMinKeeperFee(uint256 _sUSD)
Visibility
external
State Mutability
``
Requires
Modifiers
Emits
setNextPriceConfirmWindow
¶
Details
Signature
setNextPriceConfirmWindow(bytes32 _marketKey, uint256 _nextPriceConfirmWindow)
Visibility
public
State Mutability
``
Modifiers
setParameters
¶
Details
Signature
setParameters(bytes32 _marketKey, uint256 _baseFee, uint256 _baseFeeNextPrice, uint256 _nextPriceConfirmWindow, uint256 _maxLeverage, uint256 _maxSingleSideValueUSD, uint256 _maxFundingRate, uint256 _skewScaleUSD)
Visibility
external
State Mutability
``
Modifiers
setSkewScaleUSD
¶
Details
Signature
setSkewScaleUSD(bytes32 _marketKey, uint256 _skewScaleUSD)
Visibility
public
State Mutability
``
Requires
Modifiers
Internal Functions¶
_futuresMarketManager
¶
Details
Signature
_futuresMarketManager() view returns (contract IFuturesMarketManager)
Visibility
internal
State Mutability
view
_recomputeFunding
¶
Details
Signature
_recomputeFunding(bytes32 _marketKey)
Visibility
internal
State Mutability
``
_setParameter
¶
Details
Signature
_setParameter(bytes32 _marketKey, bytes32 key, uint256 value)
Visibility
internal
State Mutability
``
Emits
Events¶
LiquidationBufferRatioUpdated
¶
Signature: LiquidationBufferRatioUpdated(uint256 bps)
LiquidationFeeRatioUpdated
¶
Signature: LiquidationFeeRatioUpdated(uint256 bps)
MinInitialMarginUpdated
¶
Signature: MinInitialMarginUpdated(uint256 minMargin)
MinKeeperFeeUpdated
¶
Signature: MinKeeperFeeUpdated(uint256 sUSD)
ParameterUpdated
¶
Signature: ParameterUpdated(bytes32 marketKey, bytes32 parameter, uint256 value)