In the current implementation, the fee is sent to the vault and mint share for the fee receiver BUT it's not an accepted behaviour it should be sent as ETH to the receiver and the receiver decides to deposit it or not.
Impact\
it costs gas and time for fee receiver to unstake fees
Vault capacity will be rechecked (as we are creating new shares)
Attachments
Proof of Concept (PoC) File
Revised Code File (Optional)
+import {Address} from '@openzeppelin/contracts/utils/Address.sol';
.
.
.
function _processTotalAssetsDelta(int256 totalAssetsDelta) internal {
Github username: @0xmahdirostami Submission hash (on-chain): 0x6e08ac4396ab0a222cbd570b62a9de217544d9ef7a33796793e1648f4c93a4e3 Severity: low
Description: Description\
In the current implementation, the fee is sent to the vault and mint share for the fee receiver BUT it's not an accepted behaviour it should be sent as ETH to the receiver and the receiver decides to deposit it or not.
Impact\
Attachments
Proof of Concept (PoC) File
Revised Code File (Optional)
. . . function _processTotalAssetsDelta(int256 totalAssetsDelta) internal {
// calculate admin fee recipient assets uint256 feeRecipientAssets = Math.mulDiv(profitAssets, feePercent, _maxFeePercent);
// SLOAD to memory address _feeRecipient = feeRecipient; // mint shares to the fee recipient