Tadle

Tadle
DeFiFoundry
27,750 USDC
View results
Submission Details
Severity: low
Valid

Devs have no way implemented of collecting platform fees

Summary

There is no implementation or way for owner to collect platformFee accrued hence they are stuck with no way of getting them.

Vulnerability Details

After every taker is created and a new stock is created in PreMarkets.createTaker() , platformFee is incremented in the makerInfo struct which the trade was carried out in, but there is no current implemenation that allows the devs extract those fees out and add to treasury or run normal basic operations.

https://github.com/Cyfrin/2024-08-tadle/blob/04fd8634701697184a3f3a5558b41c109866e5f8/src/core/PreMarkets.sol#L254-L263

Impact

Platform fees are stuck in the contract

Tools Used

Manual Review

Recommendations

Add implementations that maybe after an offer is settled all protocol fees from that maker are sent to an address or contract or as the trade is happening, the proceeds are sent to an address or incremented in a state variable.

Updates

Lead Judging Commences

0xnevi Lead Judge about 1 year ago
Submission Judgement Published
Validated
Assigned finding tags:

finding-PreMarkets-platformFee-no-withdraw-functionality

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.

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.