Function: executeProcessValidatedFutures(PerpTypes.FuturesTradeUpload trade)
The function processes perp trade, which is provided by the OperatorManager contract.
Branches and code coverage
Negative behavior
accountIdhas not enough liquidity to open position.The existing position is updated by the position with opposite side.
symbolHashis not allowed.
Function call analysis
vaultManager.getAllowedSymbol(trade.symbolHash)External/Internal? External.
Argument control?
trade.symbolHashis controlled by operator.Impact: Return true if
symbolHashis allowed.
_feeSwapPosition(perpPosition, trade.symbolHash, trade.fee, trade.tradeId, trade.sumUnitaryFundings)External/Internal? External.
Argument control? All arguments are controlled by operator.
Impact: Update the
traderPosition.costPositionby fee.
_feeSwapPosition(perpPosition, trade.symbolHash, trade.fee, trade.tradeId, trade.sumUnitaryFundings) -> _perpFeeCollectorDeposit(symbol, feeAmount, tradeId, sumUnitaryFundings)External/Internal? External.
Argument control? All arguments are controlled by operator.
Impact: Update the
feeCollectorAccountIdposition; decrease thecostPositionbyfeeand setlastSumUnitaryFundingstosumUnitaryFundings.