Currently we only support swaps on Arbitrum and do not support derivatives.
Currently we only support swaps on Arbitrum and do not support derivatives.
==) or less-than-or-equal-to (<=) operators are used.
amountIn and tokenIn Parameters:
amountIn is specified and tokenIn is set to any, transactions involving any token will pass the filter, but ETH will not. This is due to the way the amount is compared when using ETH vs tokens. When amountIn is set to any, and tokenIn is set to any, both ETH and tokens will pass the filter.
tokenOut Parameter:
tokenIn is set to any and tokenOut is specified as USDC, transactions involving any token (excluding ETH) as input will pass the filter. This occurs because the MarketToken for USDC check depends on the tokenIn being explicitly provided.
struct CreateOrderParams {
CreateOrderParamsAddresses addresses;
CreateOrderParamsNumbers numbers;
Order.OrderType orderType;
Order.DecreasePositionSwapType decreasePositionSwapType;
bool isLong;
bool shouldUnwrapNativeToken;
bytes32 referralCode;
}
`
We want to confirm swapPath inside of the CreateOrderParamsAddresses matches our expected tokens and received in that same struct matches recipient.
We want to make sure that minOutputAmount and either triggerPrice or acceptablePrice match amountOut and amountIn respectively
We want to confirm orderType is a MarketSwap
`
enum OrderType {
// @dev MarketSwap: swap token A to token B at the current market price
// the order will be cancelled if the minOutputAmount cannot be fulfilled
MarketSwap,
// @dev LimitSwap: swap token A to token B if the minOutputAmount can be fulfilled
LimitSwap,
// @dev MarketIncrease: increase position at the current market price
// the order will be cancelled if the position cannot be increased at the acceptablePrice
MarketIncrease,
// @dev LimitIncrease: increase position if the triggerPrice is reached and the acceptablePrice can be fulfilled
LimitIncrease,
// @dev MarketDecrease: decrease position at the current market price
// the order will be cancelled if the position cannot be decreased at the acceptablePrice
MarketDecrease,
// @dev LimitDecrease: decrease position if the triggerPrice is reached and the acceptablePrice can be fulfilled
LimitDecrease,
// @dev StopLossDecrease: decrease position if the triggerPrice is reached and the acceptablePrice can be fulfilled
StopLossDecrease,
// @dev Liquidation: allows liquidation of positions if the criteria for liquidation are met
Liquidation
}
``