Whenever use make deposit or withdraw, btc token is minted to the owner address.
As discussed with sponser, owner will use this btc token to buyback and burn when they withdraw.
In the current function, when owner withdraw the btc token, after burning the token, protocol fee is charged again to the owner address itself.
In this case, always, the owner will left with small amount of btc token.
Impact
Charging fee to owner when they withdraw could render useless. All the btc could not be realised.
Attachments
Revised Code File (Optional)
Do not charge if the caller is the owner in withdraw function. The same can be applied with deposit also.
Github username: -- Twitter username: -- Submission hash (on-chain): 0xb820b5646c15fcb2f998ccf433ad2e0556b4073b0088a1ab9375682d56a538f0 Severity: low
Description: Description\
Whenever use make deposit or withdraw, btc token is minted to the owner address.
As discussed with sponser, owner will use this btc token to buyback and burn when they withdraw.
In the current function, when owner withdraw the btc token, after burning the token, protocol fee is charged again to the owner address itself. In this case, always, the owner will left with small amount of btc token.
Impact
Charging fee to owner when they withdraw could render useless. All the btc could not be realised.
Attachments
Do not charge if the caller is the owner in withdraw function. The same can be applied with deposit also.
VaultBitcoinWallet.sol#L375-L382