## Vulnerability Details
In any situation that the `bidtoken` is set to an asset with a callback mechanism, an attacker would be able to carry out a reentrancy as state is not properly updates.
```
function bid(uint256 amount) external virtual override onlyWhenLive {
if (amount == 0) { revert CommonEventsAndErrors.ExpectedNonZero(); }
bidToken.safeTransferFrom(msg.sender, treasury, amount);
uint256 epochIdCache = _currentEpochId;
depositors[msg.sender][epochIdCache] += amount;
EpochInfo storage info = epochs[epochIdCache];
info.totalBidTokenAmount += amount;
emit Deposit(msg.sender, epochIdCache, amount);
}
```
## Tools Used
Manual Review
## Recommendations
Update state correctly by following Checks Effects Interaction.