Description:Description\
The withdraw() function allows a user to withdraw part of their available amount by providing an id, address, amount, and signature.
However, once processedWithdrawals[id] is set to true after the first withdrawal, the user will not be able to withdraw the remaining amount later since the require statement on line 5 will fail:
Github username: -- Twitter username: 97Sabit Submission hash (on-chain): 0xb658426fd7ead10d229861fe301a9d9030a1e1fbc770e6b81c587c5aba31cf08 Severity: high
Description: Description\ The withdraw() function allows a user to withdraw part of their available amount by providing an id, address, amount, and signature.
However, once processedWithdrawals[id] is set to true after the first withdrawal, the user will not be able to withdraw the remaining amount later since the require statement on line 5 will fail:
require(processedWithdrawals[id] == false, "ALREADY_PROCESSED");
This prevents the user from withdrawing their full available amount in multiple transactions.
Steps to Reproduce:
Suggested Fix:
This will enable users to make multiple partial withdrawals as needed.
https://github.com/hats-finance/Blast-Futures-Exchange-0x97895c329b950755566ddcdad3395caaea395074/blob/d9b402f5124f1470f979ed9a6d010d89988f6dee/foundry/src/Bfx.sol#L48