Code does not follow the best practice of check-effects-interaction
Opened this issue · 0 comments
hats-bug-reporter commented
Github username: @saidqayoumsadat
Submission hash (on-chain): 0xcbcca374d0d278b9d4e66cb41bc59342e77f215944efa72f259615c36d425ee7
Severity: low
Description:
Description
Code should follow the best-practice of check-effects-interaction, where state variables are updated before any external calls are made. Doing so prevents a large class of reentrancy bugs.
file: /contracts/mocks/ERC20Mock.sol
69 delegates[msg.sender] = delegatee;
file: /contracts/mocks/HatVaultForConnectorMock.sol
93 activeClaim.challengedAt = uint32(block.timestamp);
file: /contracts/HATArbitrator.sol
128 totalBondsOnClaim[_vault][_claimId] += _bondAmount;