By combining a shortrecord with itself, it will be deleted. This removes the collateral of assets from the system without the possibility of liquidation to make things right again.
The system allows to combine multiple shortRecords into one. By sending the same shortRecord id twice to this function, so basically trying to combine it with itself, it will delete the shortRecord. This should happen, as it would remove collateral from assets without the possibility to liquidate the shortRecord and bring the collateral back to the system. It would bring the system into a weird state, where the total amount of assets created and total amount of collateral in the system is not equal to the sum of the shortRecords. This breaks the economics of the protocol and can therefore lead to a loss of user funds.
The devs of the project tried to cover this possibility in the tests, but made a mistake while doing so by passing wrong ids to the function. This led to the wrong assumption that the function reverts when the same id is given twice, as in reality the function reverted, because the ids did not exist.
The following POC below, can be executed in the test folder of the project.
Assets are no longer backed by any collateral, and there is no way to bring the collateral back. This would lead to a drop of the asset price and could potentially lead to a shutdown of the market where a lot of users could loss their funds. Also the shorter loses all funds in the shortRecord.
Manual Review
Revert if the same id appears multiple times in the given ids array.
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.