check once I don’t have idea on your Language but for every CONTEST_WON you must give 300 points , but also if their rank <=20 then bonus must be given to that 300 who has won the contest i.e; 300+(20-rank) …I think this mistake you did!.and also there may be like many CONTEST_WON activities you must include those also along with bonus if applicable.
In case of consecutive CONTEST_WON then your point will be still 300 instead of 600 for second time…or else if contest won case comes in the middle of activity your all point additions will be erased and now point will be equal to CONTEST_WON case;
i.e;//initialize point to 0;
point = point + 300 + 20 - rank;
point = point + 300;