The FeeCollector::updateFeeType updates parameters for a specific fee type. Each fee type has shares that determine how the collected fees are distributed among different stakeholders (veRAACShare, burnShare, repairShare, treasuryShare). The updateFeeType function validates that these shares total to 100% (10000 basis points). For Buy/Sell Swap Tax (type 6) and NFT Royalty fees (type 7), the inizialized total shares add up to 2000 basis points. This means it's impossible to update Buy/Sell Swap Tax and/or NFT Royalty fees or other types if the share total is less than 10000 through the intended update function (FeeCollector::updateFeeType).
Add Foundry to the project following this procedure
Create a file named FeeCollector.t.sol and copy/paste this:
Run forge test --match-test test_cantChangeParamThatDosntMatch100 -vv
The test shows that if we try to updateFeeType for Buy/Sell Swap Tax (type 6) with a total of the param of 2000 (=20%) < 10000 (100%), the function reverts and the params can't be changed.
Manual review
Modify the validation in updateFeeType to accommodate different total shares for different fee types.
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.