-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
withdrawalFee
, redeemFee
, depositFee
can be arbitrarily modified by the owner at any time without any user protections.
#69
Comments
Non-issue, Its upto protocol team to decide on fees and owner is trusted, moreover users are aware on deposit, withdraw, redeem fees. |
@0xRizwan can you please explain how exactly the users are protected from such fund losses via fee increases? I couldn't find such protection in the code. No matter that the owner is trusted, by changing the fee at any time can lead to unexpected behavior. |
Charging fee to users on deposit/withdraw/redeem is not loss of funds but intended design of protocol. Protocol can only charge upto 5% max fee so it entirely depends on protocol to decide the fee to be charged. The root of this issue is admin being malicious which is out of scope under following rules:
|
@0xRizwan thank you for your comment, The root cause of the issue is not the owner being malicious. The root issue is that the user can get charged a fee different from what they expect, and there's nothing in the code to prevent that - the attack scenario already described. Not a "good" feeling for a whale users to be charged with 5% instead 0%. I'm not sure this should be the "intended design of protocol". |
@0xRizwan please check and respond to the above comment. It's obvious this shouldn't be the "intended design of protocol". |
Github username: --
Twitter username: --
Submission hash (on-chain): 0x837ffd8ef9213e85aecd0a9d41764f49015d96a5f7910756b43286fdea98045c
Severity: medium
Description:
Description
In the current design/implementation, the protocol fees can be changed at any time by the owner which can cause involuntary and unexpected loss of user's funds.
BaseMinter contract
BaseMinterRedeem contract
BaseMinterWithdrawal contract
Attack Scenario
Attack scenario regarding increasing the
depositFee
:depositFee
= 0previewDeposit()
and the net amount that should be deposited is 100 ETHdepositFee
= 500depositFee
rise.The same exploit is valid for:
requestWithdrawal()
in BaseMinterWithdrawal contract by increasing thewithdrawalFee
redeem()
in NativeMinterRedeem and ERC20MinterRedeem contracts by increasing theredeemFee
Recommendations
The underlying issue is that users of the system can’t be sure what the behavior of a function call will be, and this is because the behavior can change at any time.
The text was updated successfully, but these errors were encountered: