fulfillRandomWords
should never revert
#307
Labels
bug
Something isn't working
downgraded by judge
Judge downgraded the risk level of this issue
duplicate-445
grade-b
QA (Quality Assurance)
Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax
Lines of code
https://github.com/code-423n4/2023-03-wenwin/blob/91b89482aaedf8b8feb73c771d11c257eed997e8/src/VRFv2RNSource.sol#L33-L35
Vulnerability details
As per chainlink's security considerations, fulfillRandomWords must not revert. However, the callback contains a revert in the case that
randomWords.length != 1
.This pattern is unecessary since we're using
randomWords[0]
regardless, and >1randomWords.length
would not cause any issues.The text was updated successfully, but these errors were encountered: