Skip to content

PerpsV2Settings

Description

Source: contracts/PerpsV2Settings.sol

Variables

CONTRACT_NAME

Source

Type: bytes32

Constructor

constructor

Source

Details

Signature

constructor(address _owner, address _resolver)

Visibility

public

State Mutability

``

Views

baseFee

Source

Details

Signature

baseFee(bytes32 _marketKey) view returns (uint256)

Visibility

external

State Mutability

view

baseFeeNextPrice

Source

Details

Signature

baseFeeNextPrice(bytes32 _marketKey) view returns (uint256)

Visibility

external

State Mutability

view

liquidationBufferRatio

Source

Details

Signature

liquidationBufferRatio() view returns (uint256)

Visibility

external

State Mutability

view

liquidationFeeRatio

Source

Details

Signature

liquidationFeeRatio() view returns (uint256)

Visibility

external

State Mutability

view

maxFundingRate

Source

Details

Signature

maxFundingRate(bytes32 _marketKey) view returns (uint256)

Visibility

public

State Mutability

view

maxLeverage

Source

Details

Signature

maxLeverage(bytes32 _marketKey) view returns (uint256)

Visibility

public

State Mutability

view

maxSingleSideValueUSD

Source

Details

Signature

maxSingleSideValueUSD(bytes32 _marketKey) view returns (uint256)

Visibility

public

State Mutability

view

minInitialMargin

Source

Details

Signature

minInitialMargin() view returns (uint256)

Visibility

external

State Mutability

view

minKeeperFee

Source

Details

Signature

minKeeperFee() view returns (uint256)

Visibility

external

State Mutability

view

nextPriceConfirmWindow

Source

Details

Signature

nextPriceConfirmWindow(bytes32 _marketKey) view returns (uint256)

Visibility

public

State Mutability

view

parameters

Source

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

Source

Details

Signature

resolverAddressesRequired() view returns (bytes32[] addresses)

Visibility

public

State Mutability

view

skewScaleUSD

Source

Details

Signature

skewScaleUSD(bytes32 _marketKey) view returns (uint256)

Visibility

public

State Mutability

view

Restricted Functions

setBaseFee

Source

Details

Signature

setBaseFee(bytes32 _marketKey, uint256 _baseFee)

Visibility

public

State Mutability

``

Requires

Modifiers

setBaseFeeNextPrice

Source

Details

Signature

setBaseFeeNextPrice(bytes32 _marketKey, uint256 _baseFeeNextPrice)

Visibility

public

State Mutability

``

Requires

Modifiers

setLiquidationBufferRatio

Source

Details

Signature

setLiquidationBufferRatio(uint256 _ratio)

Visibility

external

State Mutability

``

Modifiers

Emits

setLiquidationFeeRatio

Source

Details

Signature

setLiquidationFeeRatio(uint256 _ratio)

Visibility

external

State Mutability

``

Modifiers

Emits

setMaxFundingRate

Source

Details

Signature

setMaxFundingRate(bytes32 _marketKey, uint256 _maxFundingRate)

Visibility

public

State Mutability

``

Modifiers

setMaxLeverage

Source

Details

Signature

setMaxLeverage(bytes32 _marketKey, uint256 _maxLeverage)

Visibility

public

State Mutability

``

Modifiers

setMaxSingleSideValueUSD

Source

Details

Signature

setMaxSingleSideValueUSD(bytes32 _marketKey, uint256 _maxSingleSideValueUSD)

Visibility

public

State Mutability

``

Modifiers

setMinInitialMargin

Source

Details

Signature

setMinInitialMargin(uint256 _minMargin)

Visibility

external

State Mutability

``

Requires

Modifiers

Emits

setMinKeeperFee

Source

Details

Signature

setMinKeeperFee(uint256 _sUSD)

Visibility

external

State Mutability

``

Requires

Modifiers

Emits

setNextPriceConfirmWindow

Source

Details

Signature

setNextPriceConfirmWindow(bytes32 _marketKey, uint256 _nextPriceConfirmWindow)

Visibility

public

State Mutability

``

Modifiers

setParameters

Source

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

Source

Details

Signature

setSkewScaleUSD(bytes32 _marketKey, uint256 _skewScaleUSD)

Visibility

public

State Mutability

``

Requires

Modifiers

Internal Functions

_futuresMarketManager

Source

Details

Signature

_futuresMarketManager() view returns (contract IFuturesMarketManager)

Visibility

internal

State Mutability

view

_recomputeFunding

Source

Details

Signature

_recomputeFunding(bytes32 _marketKey)

Visibility

internal

State Mutability

``

_setParameter

Source

Details

Signature

_setParameter(bytes32 _marketKey, bytes32 key, uint256 value)

Visibility

internal

State Mutability

``

Emits

Events

LiquidationBufferRatioUpdated

Source

Signature: LiquidationBufferRatioUpdated(uint256 bps)

LiquidationFeeRatioUpdated

Source

Signature: LiquidationFeeRatioUpdated(uint256 bps)

MinInitialMarginUpdated

Source

Signature: MinInitialMarginUpdated(uint256 minMargin)

MinKeeperFeeUpdated

Source

Signature: MinKeeperFeeUpdated(uint256 sUSD)

ParameterUpdated

Source

Signature: ParameterUpdated(bytes32 marketKey, bytes32 parameter, uint256 value)