Open hats-bug-reporter[bot] opened 1 week ago
i think its straight forward, will add explanation if needed. wanted to update few things before submission. but missed. will add if needed.
I think the correct implementation is correct
l
is in units of one hour
-1 = - (+1)
Github username: -- Twitter username: -- Submission hash (on-chain): 0xf2ab7b565143db11acdbf61abe17f2a1cc9af649a99e53f0436ae87062e173f8 Severity: medium
Description: Description\
the function
_calculateIssuance
calculates the issuance amounts.following block of codes we can see.
when calculating the
l
value, 1 hours should be added. But the current code adds just 1 second.int128 l = Math64x64.fromUInt(((dB + 1) * 1 days + inflationDayZero - block.timestamp) / 1 hours + 1);
When we see the documentation.
Attack Scenario\ Incorrect
l
value comutation which lead to incorrect overcount.remove the current l calculation and add following two line. this adds the correct hour.