In the YieldOracle
contract, there is a require
statement that makes an assignment.
This deviates from the standard usage and intention of require
statements and can easily lead to confusion.
Consider moving the assignment to its own line before the require
statement and then using the require
statement solely for condition checking.
- OpenZeppelin BarnBridge Finding N01
- Error Checking
- Assignment in require()
- require() -> Checks
- No Side-effects