Open code423n4 opened 2 years ago
In the following public update functions no value is returned
won't change
Add a timelock
these can only be set once, doesn't make sense to me
Mult instead div in compares
need more detail, I think we are doing this? help wanted
Check transfer receiver is not 0 to avoid burned money
155 - not relevant 48 - is prevented on 37, and even this is not needed because we know the ownerOf lend ticket in this case is no address(0) 21 - same as above 267 - transfer to address(0) will be blocked by LoanTicket which is Solmate erc721 which blocks transfers to 0. Also not possible borrowTicker owner is address 0 88 - not relevant, is transferring to self
Override function but with different argument location
dispute, need more details
transfer return value of a general ERC20 is ignored
dispute, line given is an ERC721 transfer
Not verified input
asset - call will fail / no-op if call is not correct loanAssetContractAddress - legit, we check that it is not address(0) in lend but we should also check that the code length is not 0. sendLendTicketTo - user is responsible, but address(0) will revert to - address(0) is checked _contract - won't fix
Title: In the following public update functions no value is returned Severity: Low Risk
In the following functions no value is returned, due to which by default value of return will be 0. We assumed that after the update you return the latest new value. (similar issue here: https://github.com/code-423n4/2021-10-badgerdao-findings/issues/85).
Title: Does not validate the input fee parameter Severity: Low Risk
Some fee parameters of functions are not checked for invalid values. Validate the parameters:
Title: Add a timelock Severity: Low Risk
To give more trust to users: functions that set key/critical variables should be put behind a timelock.
Title: Mult instead div in compares Severity: Low Risk
Title: Check transfer receiver is not 0 to avoid burned money Severity: Low Risk
Transferring tokens to the zero address is usually prohibited to accidentally avoid "burning" tokens by sending them to an unrecoverable zero address.
Title: Override function but with different argument location Severity: Low/Med Risk
Title: transfer return value of a general ERC20 is ignored Severity: Low: Can be even High Risk
Need to use safeTransfer instead of transfer. As there are popular tokens, such as USDT that transfer/trasnferFrom method doesn’t return anything. The transfer return value has to be checked (as there are some other tokens that returns false instead revert), that means you must
Check the transfer return value Another popular possibility is to add a whiteList. Those are the appearances (solidity file, line number, actual line):
Title: Not verified input Severity: Low Risk