The Cairo::isFelt(...)
function is used extensively in the codebase to ensure values are properly contained in the cairo felt256 value. The maximum value of any felt256
variable is SN_MODULUS shown below
However, as shown in the function below on L58, if val
is the exactly SN_MODULUS1
the function will return false and this could cause functions like
Brdge::depositTokens(...
)
snaddressWrap(...)
and felt252Wrap(...
) (which on turn are used in the Protocol
and State
contracts respectively)
to revert and fail
This leads to a DOS in the most the contracts where the function is used
This breaks core contract functionality and could lead to a DOS
Manual review
Modifiy theCairo::isFelt(...)
function as shown below
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.