hats-finance / StakeWise-0xd91cd6ed6c9a112fdc112b1a3c66e47697f522cd

Liquid staking protocol for Ethereum
Other
0 stars 0 forks source link

The fee sholud be sent as ETH to the fee-receiver #106

Open hats-bug-reporter[bot] opened 1 year ago

hats-bug-reporter[bot] commented 1 year ago

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

  1. Proof of Concept (PoC) File

  2. Revised Code File (Optional)

    
    +import {Address} from '@openzeppelin/contracts/utils/Address.sol';

. . . function _processTotalAssetsDelta(int256 totalAssetsDelta) internal {

tsudmi commented 1 year ago

There could be not enough ETH available to send it to the recipient, it's fine to send them as shares.