Closed sherlock-admin closed 9 months ago
2 comment(s) were left on this issue during the judging contest.
tsvetanovv commented:
In my opinion this is a Low severity issue. Additionally it may count as an Admin mistake and somewhat the protocol is familiar with this - https://github.com/sherlock-audit/2024-02-rubicon-finance/tree/11cac67919e8a1303b3a3177291b88c0c70bf03b?tab=readme-ov-file#q-are-there-any-additional-protocol-roles-if-yes-please-explain-in-detail
0xAadi commented:
Invalid: Admin/Owner is Trusted and likeliness is very low
pkqs90
medium
Contract upgrades may cause DoS due to
MAX_FEE
constraintSummary
The
GladiusReactor
andRubiconFeeController
are two separate contracts capable of independent upgrades. The admin of theRubiconFeeController
has the authority to adjust fees, subject to the condition that they do not exceed theMAX_FEE
threshold specified in theGladiusReactor
. However, due to the possibility of independent upgrades to each contract, this limitation might not be enforced following such updates. This discrepancy could result in a DoS during the execution of trades, specifically within the_injectFees
function.Vulnerability Detail
The
RubiconFeeController
contract manages two types of fees: pair-wise dynamic fees and a global base fee, both of which are determined by theRubiconFeeController
admin and must not exceed theMAX_FEE
limit defined bygladiusReactor.MAX_FEE()
.GladiusReactor
, on its part, applies fees based on the outputs fromRubiconFeeController
, and will revert transactions if the fees exceed theMAX_FEE
restriction. At first glance, this setup may appear to work seamlessly. However, considering that both contracts are upgradeable, the constraints between the two contracts could diverge following an upgrade. This divergence could lead to a DoS during the fee injection phase of trading operations.Impact
Following a contract upgrade, the fees set in
RubiconFeeController
might exceedGladiusReactor
'sMAX_FEE
threshold, potentially causing a DoS for trade operations.Code Snippet
ProtocolFees.sol
RubiconFeeController.sol
Tool used
VSCode
Recommendation
Rather than reverting when fees exceed the allowable limit, it's advised to collect only up to the protocol's
MAX_FEE
as fees and to emit an event. This event can then be detected by a monitoring system.