All Reward Tokens Can Be Charged As Fee Due To Uncapped Fee
Summary
All reward tokens can be charged as fees due to uncapped fees.
Vulnerability Detail
Whenever some rewards are claimed, a certain percentage of the rewards will be sent to the FEE_RECEIVER as fees as shown in Line 78 below. It was understood from the sponsors that the FEE_RECEIVER is going to be set to Notional Treasury.
However, per the require statement in Line 39 below, it is possible to set the feePercentage to 100%, thus allowing Notional to take away all the rewards accrued and leaving the vault shareholders with nothing.
Notional can take away all the rewards accrued and leave the vault shareholders with nothing. When this happens, the vault will not grow as it has nothing left to reinvest and the value of the vault share will be stuck and will not increase.
It is recommended to set an absolute cap on the maximum fee (e.g. 5%) that can be charged against the accrued rewards. This will give users more assurance and confidence about the security of their investment in the leverage vault.
xiaoming90
medium
All Reward Tokens Can Be Charged As Fee Due To Uncapped Fee
Summary
All reward tokens can be charged as fees due to uncapped fees.
Vulnerability Detail
Whenever some rewards are claimed, a certain percentage of the rewards will be sent to the
FEE_RECEIVER
as fees as shown in Line 78 below. It was understood from the sponsors that theFEE_RECEIVER
is going to be set to Notional Treasury.https://github.com/sherlock-audit/2022-09-notional/blob/main/leveraged-vaults/contracts/vaults/balancer/mixins/AuraStakingMixin.sol#L61
Per the balancer environment file below, it was understood that the
feePercentage
is set to1%
in Line 49.https://github.com/sherlock-audit/2022-09-notional/blob/main/leveraged-vaults/scripts/BalancerEnvironment.py
However, per the require statement in Line 39 below, it is possible to set the
feePercentage
to100%
, thus allowing Notional to take away all the rewards accrued and leaving the vault shareholders with nothing.https://github.com/sherlock-audit/2022-09-notional/blob/main/leveraged-vaults/contracts/vaults/balancer/internal/BalancerVaultStorage.sol#L25
Impact
Notional can take away all the rewards accrued and leave the vault shareholders with nothing. When this happens, the vault will not grow as it has nothing left to reinvest and the value of the vault share will be stuck and will not increase.
Code Snippet
https://github.com/sherlock-audit/2022-09-notional/blob/main/leveraged-vaults/contracts/vaults/balancer/mixins/AuraStakingMixin.sol#L61 https://github.com/sherlock-audit/2022-09-notional/blob/main/leveraged-vaults/scripts/BalancerEnvironment.py https://github.com/sherlock-audit/2022-09-notional/blob/main/leveraged-vaults/contracts/vaults/balancer/internal/BalancerVaultStorage.sol#L25
Tool used
Manual Review
Recommendation
It is recommended to set an absolute cap on the maximum fee (e.g. 5%) that can be charged against the accrued rewards. This will give users more assurance and confidence about the security of their investment in the leverage vault.
Duplicate of #62