bin2chen
medium
cancelOrder() It does not unset the referralCode,maybe Loss Rewards
When the user submits an order via createOrder(), the referralCode is set if available But at this time the order has not yet been executed, it is possible that the execution failed or the user canceled the order cancel an order does not unset the referralCode There is a problem, if a user is referred to an order once submitted, but the order is invalid, the protocol will also record the referrer. After a long time, if the user executes any other order, the referrer will become him, but this is not related to the referrer, because the first order was not successful. So it is recommended to set referralCode in executeOrder()
Loss Rewards
Manual Review
set referralCode in executeOrder()