According to the NatSpec documentation, the maximum fee that a broker and the protocol can charge, essential for earning
brokerage and enhancing revenue, is set at 1e18, a constant value defined by the contract's developer. However, there is
a mistake that the developer(s) may inadvertently set the SablierFlowBase::MAX_FEE
to 0.1e18
(equivalent to 1e17
)
instead of the intended 1e18
.
Referencing SablierFlowBase::MAX_FEE
:
Repo Link:
According to the NatSpec documentation:
Repo Link
The documentation states:
@notice Retrieves the maximum fee that can be charged by the broker and the protocol, denoted as a fixed-point percentage where 1e18 represents 100%.
To demonstrate this issue, please follow the steps outlined below:
Add the following test to one of your test files:
Open your terminal and execute the following command:
Review the logs:
As evidenced, the admin cannot set the maximum fee.
The Protocol and Broker will incur a 10% loss on any total amount they wish to charge.
Since this value is constant, it cannot be changed, but it restricts the admin from setting a fee exceeding the
maximum allowed.
This issue persists even after deployment, as the admin of the protocol cannot alter this rule due to the nature of
MAX_FEE
.
Manual Review
It is essential to update the SablierFlowBase::MAX_FEE
before deploying the contract. A suggested solution is as
follows:
SablierFlowBase.sol
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.