Open hats-bug-reporter[bot] opened 2 months ago
Github username: -- Twitter username: -- Submission hash (on-chain): 0xc27d8fe6b2e9c28863b13f655cb88b30955b14d184f9e3cede3b5e3648b4be2d Severity: low
Description: Description\
We obersevd that the protocol fee is calculated during deposit and withdraw.
for example, in deposit.
VaultBitcoinWallet.sol#L473-L476
uint64 protocolFees = value * depositFee / 1000; if (isExcludedFromFees[destination]) { protocolFees = 0; }
From above code block, we understand that the 1000 = 100%
if we see the deposit , the start value , i.e, declared as 1
uint8 public depositFee = 1; --> 0.1%
Later this value can be adjusted by owner by calling the below function.
VaultBitcoinWallet.sol#L160-L166
function setProtocolFees(uint8 _depositFee, uint8 _withdrawalFee) public onlyOwner { require(_depositFee <= MAX_DEPOSIT_FEE && _withdrawalFee <= MAX_WITHDRAWAL_FEE, "FTH"); emit ProtocolFeesUpdate(_depositFee, _withdrawalFee); depositFee = _depositFee; withdrawalFee = _withdrawalFee; }
This updated is restructed for the MAX_DEPOSIT_FEE .
MAX_DEPOSIT_FEE
// Protocol fees uint8 public constant MAX_DEPOSIT_FEE = 10; uint8 public constant MAX_WITHDRAWAL_FEE = 10;
It seems that max restricted value should be within 1%. This is very minimal.
1% is 10.
During crypto boom, the fee could be adjusted to harvest fee for the benefit of the protocol.
https://ycharts.com/indicators/bitcoin_average_transaction_fee#:~:text=Bitcoin%20Average%20Transaction%20Fee%20is,they%20reached%20nearly%2060%20USD.
MAX_DEPOSIT_FEE and MAX_WITHDRAWAL_FEE could be adjusted to set to value upto 250, i.e 25%.
Spam
Github username: -- Twitter username: -- Submission hash (on-chain): 0xc27d8fe6b2e9c28863b13f655cb88b30955b14d184f9e3cede3b5e3648b4be2d Severity: low
Description: Description\
We obersevd that the protocol fee is calculated during deposit and withdraw.
for example, in deposit.
VaultBitcoinWallet.sol#L473-L476
From above code block, we understand that the 1000 = 100%
if we see the deposit , the start value , i.e, declared as 1
Later this value can be adjusted by owner by calling the below function.
VaultBitcoinWallet.sol#L160-L166
This updated is restructed for the
MAX_DEPOSIT_FEE
.It seems that max restricted value should be within 1%. This is very minimal.
1% is 10.
During crypto boom, the fee could be adjusted to harvest fee for the benefit of the protocol.
https://ycharts.com/indicators/bitcoin_average_transaction_fee#:~:text=Bitcoin%20Average%20Transaction%20Fee%20is,they%20reached%20nearly%2060%20USD.
MAX_DEPOSIT_FEE and MAX_WITHDRAWAL_FEE could be adjusted to set to value upto 250, i.e 25%.