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 felt256variable is SN_MODULUS shown below
However, as shown in the function below on L58, if valis the exactly SN_MODULUS1the function will return false and this could cause functions like
Brdge::depositTokens(...)
snaddressWrap(...)and felt252Wrap(...) (which on turn are used in the Protocoland Statecontracts 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.