https://github.com/Cyfrin/2024-10-swan-dria/blob/main/contracts/swan/Swan.sol#L268
https://github.com/Cyfrin/2024-10-swan-dria/blob/main/contracts/swan/Swan.sol#L129
The protocol establish the presence of a platformFee for the service it provides that is a percentage of the buyerFee on every listed asset. Therefore, this value is always <=100.
However in case platformFee == 100 the protocol would pay fees for a useless transfer.
In case platformFee == 100 we have that buyerFee == driaFee making the buyerFee-driaFee transfer useless because of 0 amount. However, there is no condition in the function to prevent this to happen.
The amount of fees lost by the protocol for all the useless transactions. This amount depends on the number of listed assets when the platformFee == 100 condition is verified.
Although this is not likely it could happen because market parameters may change over time and we cannot say that there won't be platformFee == 100 considering a rerquirement in the Swanmanager::setMarketParameters stating _marketParameters.platformFee <= 100.
Manual review
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.