code-423n4 / 2022-06-illuminate-findings

1 stars 0 forks source link

QA Report #380

Open code423n4 opened 2 years ago

code423n4 commented 2 years ago

[NC - 01] - Readability could be improved when taking max value of a type

Here, since Solidity 0.8.8, you can use type(uint256).max.

Check https://github.com/ethereum/solidity/blob/develop/Changelog.md#088-2021-09-27

[NC - 02] - Typo

Here, avaialable -> available

[NC - 03] - Typo

Here, prinicipal -> principal

[NC - 04] - Use readable variable names

The code interact with various protocols and is already quite complicated, no need to obfuscate it with unreadable variable names such as u, n, m,

[L - 01] - Redeem does not behave as explained in the comments

https://github.com/code-423n4/2022-06-illuminate/blob/912be2a90ded4a557f121fe565d12ec48d0c4684/redeemer/Redeemer.sol#L128

When redeeming Illuminate's token, the underlying is not sent back to the user, like said in the previous comment. So reading this function code is misleading and may lead to a user calling it.