Closed code423n4 closed 2 years ago
vToken's lastBalance will never eq 0
"vToken's lastBalance will never eq 0" No explanation given here as why this is the case but beleive its 0xdead holding tokens. Note the orderer could burn the tokens from 0xdead in a very unlikely case. This is not medium in this context.
Lines of code
https://github.com/code-423n4/2022-04-phuture/tree/main/contracts/libraries/NAV.sol#L97
Vulnerability details
Division by 0 can lead to accidentally revert, (An example of a similar issue - https://github.com/code-423n4/2021-10-defiprotocol-findings/issues/84)
https://github.com/code-423n4/2022-04-phuture/tree/main/contracts/libraries/NAV.sol#L97 last balance can be 0!!
Those are also issues but less severe (for example time elapsed can be 0 in special cases).