No function for the owner to withdraw the platform fees.
As we can see in the the tokenManager
contract there is no function to withdraw the platform fees taken during a trade, there is a function to rescue token using the Rescuable
contract's rescue
function but the makerInfo.platformFees
will never be deducted nor is it safe to directly withdraw the tokens because there is a high chance of accounting mistake considering the amount of makerInfo that will be created.
Create a function that takes in a makerInfo as an argument and allow the owner to withdraw the makerInfo.platformFees
and reset the makerInfo.platformFees
.
The whenNotPaused
and whenPaused
modifiers are not used anywhere in the contracts which makes the pause mechanism useless. Therefore even if the admins call pause function it is useless.
Also from the Pausable
contract comments:
Recommended mitigation: use the given modifiers in the functions you want it to be pausable, otherwise there is no use of inheriting the Pausable contract.
In the closeBidTaker
functio, when the points are not settled for the buyer we calculate the collateral amount to give to the buyer;
But his part where if the offer is virgin, we sent all the collateral to the buyers.
However, this should not be the case and only the else statement part needs to be executed everytime because there can be some amount of collateral that are being unused, and the buyer should only be incentivized with the used collateral(for the points they bought) and never the unused collateral.
Anyway, reporting this as an info because the first if statement will never be triggered as the function already makes sure that the offer.status is settled, which means it is not virgin.
So, simply remove the first if statement.
Low severity, this can be done using the `Rescuable.sol` contract. Arguably there is no errors here given the `platformFee` variable can represent the historical fees that the protocol has accumulated and need not be updated when fees are withdrawn. However, I believe a more explicit function can be valuable to be more transparent regarding withdrawals. However, I will leave this issue open for escalation for debates because I can see it as arguably invalid as well, but I see no arguments for it being medium severity since there is an alternative to retrieve platform fees, assuming admins are trusted.
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.