Skip to content

PerpsV2MarketProxyable

Description

Source: contracts/PerpsV2MarketProxyable.sol

Constructor

constructor

Source

Details

Signature

constructor(address payable _proxy, address _marketState, address _owner, address _resolver)

Visibility

public

State Mutability

``

Internal Functions

_applyDebtCorrection

Source

Details

Signature

_applyDebtCorrection(struct IPerpsV2MarketBaseTypes.Position newPosition, struct IPerpsV2MarketBaseTypes.Position oldPosition)

Visibility

internal

State Mutability

``

_assertPriceImpact

Source

Details

Signature

_assertPriceImpact(uint256 price, uint256 fillPrice, uint256 priceImpactDelta, int256 sizeDelta) view returns (uint256)

Visibility

internal

State Mutability

view

_assetPriceRequireSystemChecks

Source

Details

Signature

_assetPriceRequireSystemChecks(bool checkOffchainMarket) returns (uint256)

Visibility

internal

State Mutability

``

_positionDebtCorrection

Source

Details

Signature

_positionDebtCorrection(struct IPerpsV2MarketBaseTypes.Position position) view returns (int256)

Visibility

internal

State Mutability

view

_recomputeFunding

Source

Details

Signature

_recomputeFunding(uint256 price) returns (uint256 lastIndex)

Visibility

internal

State Mutability

``

_trade

Source

Details

Signature

_trade(address sender, struct PerpsV2MarketBase.TradeParams params)

Visibility

internal

State Mutability

``

_updatePositionMargin

Source

Details

Signature

_updatePositionMargin(address account, struct IPerpsV2MarketBaseTypes.Position position, uint256 price, int256 marginDelta)

Visibility

internal

State Mutability

``

addressToBytes32

Source

Details

Signature

addressToBytes32(address input) pure returns (bytes32)

Visibility

internal

State Mutability

pure

emitFundingRecomputed

Source

Details

Signature

emitFundingRecomputed(int256 funding, int256 fundingRate, uint256 index, uint256 timestamp)

Visibility

internal

State Mutability

``

emitMarginTransferred

Source

Details

Signature

emitMarginTransferred(address account, int256 marginDelta)

Visibility

internal

State Mutability

``

emitPerpsTracking

Source

Details

Signature

emitPerpsTracking(bytes32 trackingCode, bytes32 baseAsset, bytes32 marketKey, int256 sizeDelta, uint256 fee)

Visibility

internal

State Mutability

``

emitPositionLiquidated

Source

Details

Signature

emitPositionLiquidated(uint256 id, address account, address liquidator, int256 size, uint256 price, uint256 fee)

Visibility

internal

State Mutability

``

emitPositionModified

Source

Details

Signature

emitPositionModified(uint256 id, address account, uint256 margin, int256 size, int256 tradeSize, uint256 lastPrice, uint256 fundingIndex, uint256 fee)

Visibility

internal

State Mutability

``

Events

FundingRecomputed

Source

Signature: FundingRecomputed(int256 funding, int256 fundingRate, uint256 index, uint256 timestamp)

MarginTransferred

Source

Signature: MarginTransferred(address account, int256 marginDelta)

PerpsTracking

Source

Signature: PerpsTracking(bytes32 trackingCode, bytes32 baseAsset, bytes32 marketKey, int256 sizeDelta, uint256 fee)

PositionLiquidated

Source

Signature: PositionLiquidated(uint256 id, address account, address liquidator, int256 size, uint256 price, uint256 fee)

PositionModified

Source

Signature: PositionModified(uint256 id, address account, uint256 margin, int256 size, int256 tradeSize, uint256 lastPrice, uint256 fundingIndex, uint256 fee)