In the createOffer
function of the PreMarkets
contract, the platformFee
attribut of the new MakerInfo
is incorrectly set to 0 instead of the user's actual platform fee rate in the SystemConfig
contract.
The createOffer
function updates the makerInfoMap
with the platformFee
set to 0:
The correct platform fee rate for the user should be fetched from the SystemConfig
contract using the getPlatformFeeRate
function.
Setting the platformFee to 0 instead of the actual user-defined platform fee rate can lead to incorrect fee calculations. This discrepancy can result in financial inaccuracies, potentially causing revenue loss or mismanagement of platform fees.
Manual Code Review
Fetching the User's Platform Fee Rate: Use the getPlatformFeeRate
function to obtain the current platform fee rate for the user. This ensures that the fee is set according to the most recent configuration.
Storing the Correct Fee Value: Update the platformFee
field in the MakerInfo
struct with this fetched value, rather than setting it to 0. This would ensure that the fee information is correctly stored and utilized.
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.