The LiquidationPool::distributeAssets function is designed to distribute assets to users who have staked in the liquidation pool. However, there is a vulnerability in the function related to the scaling of costInEuros .
Chainlink Pricefeeds:
WBTC
ARB
LINK
PAXG
EUR/USD
According to the test case and white paper:
_assets is the assets to be distributed.
_hundredPC is a constant to represent 100%, 1e5.
_collateralRateis the required collateral % in the smart vault. currently 110%, 1.1e5.
priceEurUsd did not take into account if the decimals of asset tokens are not in 8 decimals place. It is assumed that all tokens were 8 decimals in place.
To check for decimals precision this is my PoC.
The following are the scenario exploits when LiquidationPool::distributeAssets is called:
Full Code Snippet:
If asset tokens are in 18 decimals place, the user gets a highly deflated reward portion, while if asset token is 8 decimals, the user gets a highly inflated reward portion.
Manual Review
Ensure that the priceEurUsd scales correctly for different asset decimals.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.