We currently rely on filledAmount[orderUid] to determine if a fill-or-kill order was executed or not. However, if sellAmount is zero (and buyAmount is zero, as noted below) and the order is executed then filledAmount does not change, which means that the order can be executed again. This is problematic as the fee would be taken multiple times from the user.
This is not critical for normal user orders as we don't generate zero-sell-amount orders in the interface. It's however unlikely but possible that a user creates an order selling nothing for a fee and would be affected by this issue. Most importantly, it could cause bugs in contracts that rely on filledAmount as well, see for example the ETH-flow contract case.
In the current code, this is not an issue for partially fillable orders.
We currently rely on
filledAmount[orderUid]to determine if a fill-or-kill order was executed or not. However, ifsellAmountis zero (andbuyAmountis zero, as noted below) and the order is executed thenfilledAmountdoes not change, which means that the order can be executed again. This is problematic as the fee would be taken multiple times from the user.This is not critical for normal user orders as we don't generate zero-sell-amount orders in the interface. It's however unlikely but possible that a user creates an order selling nothing for a fee and would be affected by this issue. Most importantly, it could cause bugs in contracts that rely on
filledAmountas well, see for example the ETH-flow contract case.In the current code, this is not an issue for partially fillable orders.