Description:
_handleWethRewardDistribution
in FeeDistributionBranch
, and distributeProtocolAssetReward
in MarketMakingEngineConfiguration.sol
uses the distribution logic. The current logic of simply adding this leftover to receivedVaultsWethRewardX18
is incorrect and exacerbates the unfairness introduced by the rounding compensation in distributeProtocolAssetReward
.
In _handleWethRewardDistribution
, the leftover is added to receivedVaultsWethRewardX18
:
This means that the leftover is given to vaults, which are already favored by the rounding compensation in distributeProtocolAssetReward
. This further exacerbates the unfairness introduced by the rounding compensation in distributeProtocolAssetReward
.
The two unfair effects this causes are:
Protocol recipients lose precision from initial division
Vaults gain these lost amounts, violating intended share ratios
impact:
It means that not only is the last protocol fee recipient unfairly favored within protocol fee distribution, but also vaults are further favored at the expense of protocol fee recipients overall because the "leftover" (caused by under-distribution to protocol recipients due to integer division) is then given to vaults. This is a double-unfairness issue that can lead to significant discrepancies in reward allocation over time, especially if there are many fee recipients and frequent distributions.
Proof of Concept:
Recomended Mitigation:
Remove Vault-Side Leftover Assignment
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.