After the contest is over and all prizes have been distributed, the fee is also charged when rescuing token by distributeOwner
to take out the token that was accidentally sent.
Tokens stuck in the Distributor contract(proxy) should be taken out through the distributeByOwner
function. Since distribute
is the only function that can take out tokens from the Distributor contract, it should use this function to take out tokens.
Distributor.distribute
is a function for distributing prizes to winners and internally calls _distribute
. _distribute
transfer 5% protocol fee to STADIUM_ADDRESS
This fee is for using the protocol. Therefore, it seems unreasonable to charge a fee of 5% to users who did not use the protocol and only sent tokens by mistake. There is no specified anywhere in the documentation or explanation to take fee for accidental token sent.
Also, the user will be logged by emit Distributed(token, winners, percentages, data);
. It is not right that the user will be marked as a winner in the log who is not winner.
If you use The Graph service or collect events to display information on web2, incorrect information will be displayed due to incorrect events.
So, it is better to create and use a function to rescue tokens at Distributor contract.
A protocol fee is also charged from those who mistakenly insert tokens. Unnecessary logs are maked, causing confusion.
vscode
Create and use a function to rescue tokens at Distributor contract.
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.