Function: executeProcessValidatedFutures(PerpTypes.FuturesTradeUpload trade)
The function processes perp trade, which is provided by the OperatorManager contract.
Branches and code coverage
Negative behavior
accountId
has not enough liquidity to open position.The existing position is updated by the position with opposite side.
symbolHash
is not allowed.
Function call analysis
vaultManager.getAllowedSymbol(trade.symbolHash)
External/Internal? External.
Argument control?
trade.symbolHash
is controlled by operator.Impact: Return true if
symbolHash
is 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.costPosition
by 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
feeCollectorAccountId
position; decrease thecostPosition
byfee
and setlastSumUnitaryFundings
tosumUnitaryFundings
.