In SablierV2NFTDescriptor::generateAccentColor
100% lightness is never actually achieved.
In contract SablierV2NFTDescriptor
the generateAccentColor
function calculates lightness by this formula
according to docs The lightness is typically a percentage between 0% (black) and 100% (white), but here the range is bounded to [30,100] to avoid dark colors.
but here by using this formula 100% lightness is never achieved. The (bitField & 0xFF) % 70
will always return a value between [0,69] and never reach 70. which thus result in overall range from 30 to 99. This way 100% lightness is never achieved.
The 100% lightness percentage is never achieved.
Manual Analysis
use this line of code instead of old one to count the lightness.
this way the lightness will come in range [30,100] as the protocol intended it to be.
https://docs.codehawks.com/hawks-auditors/how-to-determine-a-finding-validity
https://docs.codehawks.com/hawks-auditors/how-to-determine-a-finding-validity
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.