Cheesy Cinnabar Mammoth
High
The README state "Maximum total fees cannot exceed 10%", however, this isn't true. When a user calls buyVotes()
, they should be charged the protocol fee of entryProtocolFeeBasisPoints
on the amount they pay for in votes. However, the protocol fee is charged on the amount the user sends in, NOT on the amount they end up paying.
The protocol fee is being applied to the msg.value amount funds, instead of to the actual amount the user is to pay for the votes they purchased.
- A non zero
entryProtocolFeeBasisPoints
is set
- A user calls
buyVotes()
with a msg.value amount that is greater than the actual amount they end up paying.
- Market is created
- User calls buyVotes()
- The amount they actually have to pay is less than the msg.value amount
- They get charged the protocol fee on the msg.value amount rather than the amount they paid for
- They get refunded any amount they didn't use, but still paid the protocol fee on that amount.
Users buying votes get overcharged in protocol fee
No response
Apply the fee to the fundsPaid, not the msg.value amount.