Summary
Vulnerability Details
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.
Impact
Instances (13):
File: contracts/LiquidationPool.sol
155: positions[msg.sender].TST -= _tstVal;
159: positions[msg.sender].EUROs -= _eurosVal;
170: delete rewards[abi.encodePacked(msg.sender, _token.symbol)];
188: positions[_holder].EUROs += _amount * positions[_holder].TST / tstTotal;
191: pendingStakes[i].EUROs += _amount * pendingStakes[i].TST / tstTotal;
237: positions[holders[j]] = _position;
155, 159, 170, 188, 191, 237
File: contracts/LiquidationPoolManager.sol
24: TST = _TST;
25: EUROs = _EUROs;
26: smartVaultManager = _smartVaultManager;
27: protocol = _protocol;
28: poolFeePercentage = _poolFeePercentage;
24, 25, 26, 27, 28
File: contracts/SmartVaultV3.sol
163: minted = minted + _amount + fee;
171: minted = minted - _amount;
163, 171
Tools Used
Recommendations