The Standard

The Standard
DeFiHardhat
20,000 USDC
View results
Submission Details
Severity: high
Valid

distributeAssets lacks important access control

Summary

The distributeAssets function in LiquidityPool lacks access control even though it is only supposed to be called by the LiquidationPoolManager.

Vulnerability Details

The function is supposed to only be called by the LiquidationPoolManager via the runLiquidation function.

The sponsor confirmed this, but also if this isn't the case, then anyone will be able to call it, passing any assets they want and any values for _collateralRate and _hundredPC which in turn affect the calculations of the rewards, so a malicious users could manipulate his rewards and then drain the pool.

function distributeAssets(ILiquidationPoolManager.Asset[] memory _assets, uint256 _collateralRate, uint256 _hundredPC) external payable

Impact

Rewards manipulation and lost of funds.

Tools Used

Manual review

Recommendations

Add an access control modifier.

Updates

Lead Judging Commences

hrishibhat Lead Judge over 1 year ago
Submission Judgement Published
Validated
Assigned finding tags:

distributeAssets-issue

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.