Anyone can call LiquidationPool.distributeAssets() and pass in any malicious asset they want. This can cause various issues with the LiquidationPool accounting.
The LiquidationPool.distributeAssets() can be seen below:
This function lacks various checks:
No checks to see who msg.sender is
No validation as to whether or not the tokens are valid accepted tokens by the protocol
No validation as to the contents of the ILiquidationPoolManager.Asset attributes which are used in accounting updates. This includes:
token.clAddr
token.symbol
token.addr
Because of these lack of checks, a user can pass in an arbitrary value. For example, let's say that a user passes in an asset with the following values:
If this asset was passed into distributeAssets(), the following changes would occur:
assetPriceUsd becomes an arbitrary value as the hacker can determine which Chainlink exchange rate gives them the best odds. This influences how much staked position is decreased as well as how many EUROs are burned.
An arbitrary reward would be increased as the asset token symbol can point to any of the reward tokens the user can receive.
The token address will always succeed on safeTransferFrom or allow the hacker a re-entrancy into the contract.
The LiquidationPool contract is effectively nerfed by allowing anyone to call this function with arbitrary assets.
Manual Review
Restrict who can call this function but also what acceptable assets can be passed in. Retrieve those assets from the protocol itself and do not rely on the caller to provide those values.
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.