Closed code423n4 closed 1 year ago
The core functions are meant to be accessed through the periphery contracts, but they periphery contracts are meant to be swappable so that is why the address of them is not hard coded.
kyscott18 marked the issue as sponsor acknowledged
The deadline
parameter is a safety measure for users. If a user is not using the periphery contracts and instead is directly interacting with the Lendgine
core contract, it's the user's very own fault if any issues arise.
berndartmueller marked the issue as unsatisfactory: Invalid
Lines of code
https://github.com/code-423n4/2023-01-numoen/blob/2ad9a73d793ea23a25a381faadc86ae0c8cb5913/src/periphery/LendgineRouter.sol#L141-L143
Vulnerability details
Impact
Minting of power token can bypass deadline check.
Proof of Concept
If the borrower calls mint() in LendgineRouter.sol, there is a checkDeadline parameter to check if deadline < block.timestamp.
However, if the borrower calls mint() on Lendgine instead to mint the ERC20 Power token, there is not checkDeadline enforced.
Tools Used
VSCode
Recommended Mitigation Steps
Make sure the function that controls minting of power token can only be called through one contract, like how Pair.sol does it.