| [Blocklists](https://github.com/d-xo/weird-erc20?tab=readme-ov-file#tokens-with-blocklists)                                                                | In scope    |
  function collectFees() external nonReentrant sphereXGuardExternal {
    MarketState memory state = _getUpdatedState();
    if (state.accruedProtocolFees == 0) revert_NullFeeAmount();

    uint128 withdrawableFees = state.withdrawableProtocolFees(totalAssets());
    if (withdrawableFees == 0) revert_InsufficientReservesForFeeWithdrawal();

    state.accruedProtocolFees -= withdrawableFees;
    asset.safeTransfer(feeRecipient, withdrawableFees);
    _writeState(state);
    emit_FeesCollected(withdrawableFees);
  }
    asset.safeTransfer(feeRecipient, withdrawableFees);
function collectFees() external nonReentrant {
    // ... state updates and checks ...
    accumulatedFees[feeRecipient] += withdrawableFees;
    emit FeesCollected(withdrawableFees);
}

function withdrawFees() external {
    uint256 amount = accumulatedFees[msg.sender];
    accumulatedFees[msg.sender] = 0;
    asset.safeTransfer(msg.sender, amount);
}
