code-423n4 / 2021-12-yetifinance-findings

0 stars 0 forks source link

contracts/TroveManagerLiquidations.sol is missing inheritance #187

Open code423n4 opened 2 years ago

code423n4 commented 2 years ago

Handle

heiho1

Vulnerability details

Impact

TroveManagerLiquidations does not inherit contracts/Interfaces/ITroveManagerLiquidations.sol but should. Note that TroveManager.sol does inherit ITroveManager. Decoupling an interface from its implementation can lead to code drift and incomplete or incorrect interfaces/implementations.

Proof of Concept

https://github.com/code-423n4/2021-12-yetifinance/blob/5f5bf61209b722ba568623d8446111b1ea5cb61c/packages/contracts/contracts/TroveManagerLiquidations.sol#L14

Tools Used

Slither

Recommended Mitigation Steps

Declare contract as "TroveManagerLiquidations is TroveManagerBase, ITroveManagerLiquidations"

kingyetifinance commented 2 years ago

Could be lumped with #188