Platform: Code4rena
Start Date: 04/01/2022
Pot Size: $25,000 USDC
Total HM: 3
Participants: 40
Period: 3 days
Judge: Ivo Georgiev
Total Solo HM: 1
Id: 75
League: ETH
Rank: 28/40
Findings: 1
Award: $45.10
🌟 Selected for report: 1
🚀 Solo Findings: 0
45.1044 USDC - $45.10
wuwe1
In contract XDEFIDistribution
, the only use of bonusMultiplier
is to calculate units
in _lock
.
In contract XDEFIDistributionHelper
, bonusMultiplier
is used for return value. However, bonusMultiplier
can be calculated by units * 100 / depositedXDEFI
.
#0 - deluca-mike
2022-01-06T08:19:10Z
We did this so that a client can be easily aware of what a position's bonus multiplier is. Yes, the client can and should check for events, or at least watch for the event on locking and then save it locally (cache), but since we had some free bytes in the struct, we decided there wasn't much harm adding it.
However, bonusMultiplier
can be computed from depositedXDEFI
and units
via: bonusMultiplier = (units * 100) / depositedXDEFI
, so we will remove it from the struct.
#1 - deluca-mike
2022-01-14T03:36:49Z
bonusMultiplier
removed from Position struct in release candidate contract.
#2 - Ivshti
2022-01-16T06:25:01Z
seems to be resolved