The _calculateDistribution function incorrectly calculates the distribution of total fees among different stakeholders.
The FeeCollector::_calculateDistribution()
function first calculates the weighted share of each fee type relative to totalFees
and assigns these to shares
. However, after summing up the weighted shares, the function overwrites them:
Since shares
are already weighted relative to totalFees
, this second scaling step results in incorrect share allocations. The final allocations will not accurately reflect the intended distribution percentages.
Incorrect distribution of fees among veRAAC holders
The initial calculation already distributes the fees correctly, so applying an additional scaling factor leads to incorrect results. The correct approach is to directly assign the weighted values to shares
without further modification.
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.