authorityReferralBonus
is for makers who has provided collateral and takers provides it.
But this bonus is transferred to takers again.
In the PreMarkets._updateReferralBonus
function, authorityReferralBonus
is transferred to msg.sender
from L883.
This function is called in PreMarkets.createTaker
, and msg.sender
is taker.
authorityReferralBonus
is calculated from platformFee
and platformFee
is provided from taker.
As a result, instead of maker, taker receives the authorityReferralBonus
.
This leads the loss of funds for makers.
Manual Review
It is recommended to change the code as following:
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.