Closed sherlock-admin3 closed 7 months ago
The protocol team fixed this issue in the following PRs/commits: https://github.com/Axis-Fi/moonraker/pull/158
Escalate,
In order for a curator to set himself as the curator and start receiving fees, he first has to call the setCuratorFee() function
function setCuratorFee(Keycode auctionType_, uint48 fee_) external {
// Check that the fee is less than the maximum
if (fee_ > fees[auctionType_].maxCuratorFee) revert InvalidFee();
// Set the fee for the sender
fees[auctionType_].curator[msg.sender] = fee_;
}
As shown in the above code snippet there is a check that the fee is not bigger than the maxCurator fee. Therefore a curator cannot simply bypass the max curator fee. In the case the protocol decides to lower the curator fee, and there is a curator that still hasn't set his fee, the curator will have to frontrun the transaction and set his fee with the higher maxCuratorFee, (or considering the possibility that the same address can be a curator for different auctions seems highly unlikely).
If the protocol decides to offer different curator fees, it can simply add a new module with the desired curator fee.
This issue should be considered as low, as there is no direct loss of funds or breaking core contract functionality
Escalate,
In order for a curator to set himself as the curator and start receiving fees, he first has to call the setCuratorFee() function
function setCuratorFee(Keycode auctionType_, uint48 fee_) external { // Check that the fee is less than the maximum if (fee_ > fees[auctionType_].maxCuratorFee) revert InvalidFee(); // Set the fee for the sender fees[auctionType_].curator[msg.sender] = fee_; }
As shown in the above code snippet there is a check that the fee is not bigger than the maxCurator fee. Therefore a curator cannot simply bypass the max curator fee. In the case the protocol decides to lower the curator fee, and there is a curator that still hasn't set his fee, the curator will have to frontrun the transaction and set his fee with the higher maxCuratorFee, (or considering the possibility that the same address can be a curator for different auctions seems highly unlikely).
- This should be considered an admin mistake and as per sherlock rules An admin action can break certain assumptions about the functioning of the code. Example: Pausing a collateral causes some users to be unfairly liquidated or any other action causing loss of funds. This is not considered a valid issue.
- There is a certain trust assumption that the curator won't try and scam the auction creator, as curator address parameter is controlled by the auction creator - a case can be made that setting a curator who is willing to try and scam the auction creator is a user mistake and as per sherlock rules User input validation to prevent user mistakes is not considered a valid issue.
If the protocol decides to offer different curator fees, it can simply add a new module with the desired curator fee.
This issue should be considered as low, as there is no direct loss of funds or breaking core contract functionality
You've created a valid escalation!
To remove the escalation from consideration: Delete your comment.
You may delete or edit your escalation comment anytime before the 48-hour escalation window closes. After that, the escalation becomes final.
Agree with @AtanasDimulski, I believe this issue can be considered low severity, given it could also be quite unfair for curators with higher than original max fees to suddenly have their fees subject to slashing
Planning to accept escalation and invalidate issue. I believe the following judging rule applies
An admin action can break certain assumptions about the functioning of the code.
Result: Invalid Unique
The protocol team fixed this issue in the following PRs/commits: Axis-Fi/moonraker#158
FIxed Now the fee is set to maxCuratorFee at the time of auction creation in case the curator's fee is greater
The Lead Senior Watson signed off on the fix.
hash
medium
Max curator fee would be bypassed for existing curators
Summary
Max curator fee would be bypassed for existing curators
Vulnerability Detail
In the protocol, the admin can set the max fees for curation
But even if the max curator fee is lowered, a curator can enjoy their old fees (which can be higher than the current max curator fees) since the curate function doesn't check for this condition
Impact
Curators can obtain a fee higher than the max fee
Code Snippet
curate function doesn't check the max fee constraint https://github.com/sherlock-audit/2024-03-axis-finance/blob/cadf331f12b485bac184111cdc9ba1344d9fbf01/moonraker/src/AuctionHouse.sol#L652
Tool used
Manual Review
Recommendation
When fetching the fees inside the curate function, check if the fee is greater than the current max curator fee. If this is the case, set the fees to the max curator fee