When transferring funds based on shares, there may be residual "dust" funds that are not handled correctly.
Small amounts of funds may be sent to actors, leading to confusion and minimal loss of funds.
Let's assume:
bursary = 1e18 (USDC)
TEACHER_WAGE = 35 (35%)
PRINCIPAL_WAGE = 5 (5%)
PRECISION = 100
totalTeachers = 3
Calculations:
Calculate total teacher pay:
Calculate payPerTeacher:
Calculate principalPay:
Calculate remaining bursary after wages transfered:
Calculate total pay after upgrade:
Calculate Dust:
dust = bursaryAfterUpgrade - bursary
dust = 2
Manual review.
Ensure the last transfer handles all residual funds to avoid dust.
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.