Boost creator can collect all the fees by setting referralFee to 9000 and give claimants his address as referrer address
Summary
The boost creator can set the value of referralFee to 9_000 when creating the boost. The BoostCore::referralFee (the base fee) is set to 1000 in line 70,
This will make the BoostCore::referralFee to be 10_000 (equal to the BoostCore::FEE_DENOMINATOR) ensuring that 100% of the fees collected when claimants claim their incentives are sent to the referrer address. To get the fees, the boost creator just need to ensure claimants use his address as referrer_ address. The protocol will never receive any fee for this particular boost.
Root Cause
Maximum value for BoostCore::referralFee was not set, allowing boost creators to allocate unlimited fraction of the fees to the referrer.
Internal pre-conditions
No response
External pre-conditions
No response
Attack Path
No response
Impact
The protocol will receive no fees as all the fees will continuously be sent to the referrer_ address.
PoC
Please copy the code below into BoostCore.t.sol and run the test.
SyncCode2017
High
Boost creator can collect all the fees by setting referralFee to 9000 and give claimants his address as referrer address
Summary
The boost creator can set the value of referralFee to 9_000 when creating the boost. The
BoostCore::referralFee
(the base fee) is set to 1000 in line 70,https://github.com/sherlock-audit/2024-06-boost-aa-wallet/blob/main/boost-protocol/packages/evm/contracts/BoostCore.sol#L70
and added to the boost creator input in line 122,
https://github.com/sherlock-audit/2024-06-boost-aa-wallet/blob/main/boost-protocol/packages/evm/contracts/BoostCore.sol#L122
This will make the
BoostCore::referralFee
to be 10_000 (equal to theBoostCore::FEE_DENOMINATOR
) ensuring that 100% of the fees collected when claimants claim their incentives are sent to the referrer address. To get the fees, the boost creator just need to ensure claimants use his address as referrer_ address. The protocol will never receive any fee for this particular boost.Root Cause
Maximum value for
BoostCore::referralFee
was not set, allowing boost creators to allocate unlimited fraction of the fees to the referrer.Internal pre-conditions
No response
External pre-conditions
No response
Attack Path
No response
Impact
The protocol will receive no fees as all the fees will continuously be sent to the referrer_ address.
PoC
Please copy the code below into BoostCore.t.sol and run the test.
Mitigation
Set a maximum value for
BoostCore::referralFee
and refactorBoostCore::createBoost
as shown below.