Closed code423n4 closed 1 year ago
The Payment
abstract utility contract is only used by the LendgineRouter
and the LiquidityManager
contracts, which both do not intend to hold any token funds directly.
If there's leftover WETH in those two contracts, it's not systematic and only because a previous user mistakenly transferred the incorrect amount. Additionally, the protocol is permissionless, there's no contract owner.
Closing as invalid.
berndartmueller marked the issue as unsatisfactory: Invalid
Lines of code
https://github.com/code-423n4/2023-01-numoen/blob/main/src/periphery/Payment.sol#L25-L46
Vulnerability details
Impact
In
Payment.sol
contract, there is no access control onunwrapWETH
,sweepToken
andrefundETH
. So anyone can call these method to steal the Eth.Proof of Concept
Link to Code
You can see there is no Access Control on these functions and they are
public
orexternal
.LendgineRouter
andLiquidityManager
inheritsPayment
, so these functions are externally exposed to everyone. So any balance can be stealed by anyone.Tools Used
Manual Review
Recommended Mitigation Steps
By providing an access control the issues can be mitigated. Another Option is to remove these functions as they are not utilised by any other function.