The distribute() function in the Distributor contract charges a commission fee on each sponsored token before prizes are paid out. This occurs independently on every token, rather than based on the total value distributed. Charging commission on a per-token basis can result in disproportionately high /unfair fees for the stadium.
The per-token commission structure can lead to disproportionate results regardless of the number of winners, as long as prizes are distributed across multiple tokens.
Assume there are 2 winners and prizes are distributed evenly across 2 tokens, the stadium receives double the share of the total prize pool through commissions.
For each contest stadium may only receive 5% of the total value, but with a 5% commission on each token, the stadium receives 10% of the pool.
Whitelisted tokens
DAI, USDC, USDT, WBTC, WETH
Amy creates a contest
Bob sponsors with:
10 DAI
10 USDC
10 USDT
Carol sponsors with:
5 WBTC
5 WETH
For total 40 tokens Amy selects 2 winners:
Doug
Edward
Amy calls distribute():
Doug gets 9.5 DAI, 9.5 USDC, 4.75 WBTC
Edward gets 9.5 USDT, 4.75 WETH
Stadium commission is 5% per token:
0.5 DAI
0.5 USDC
0.5 USDT
0.25 WBTC
0.25 WETH
Results:
Doug received 23.75 tokens in prizes
Edward received 14.25 tokens in prizes
Stadium received 2.5 tokens in commissions
This is 6.25% of the total 40 tokens
The fewer the winners, the more disproportionate the stadium commissions will be.
More the winners there is a chance where the stadium commission exceeds amount received by each winner.
It is Medium issue as it got high likelihood as the issue arise whenever multiple tokens are used for distributions, low impact as in many cases the commission is just as dust but the fairness of the resulting commission amounts should be evaluated.
Manual Code Review, VSCode
Charge commission only on a primary payout token by using exchange or explore a way to distributed commission based on total value sponsored.
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.