Description:
When liquidated assets are to be sold in the pool, the getStakeTotal()
function is called to measure the value of stake in the pool, which is then used to ration the reward distribution. However, the getStakeTotal()
function loops through all staking positions and sums the smaller of TST or EUROs amount. This means that any position with only EUROs wouldn't be factored into the liquidation process. These EUROs remain untouched even if the liquidation process requires more liquidity to complete the trade. This inefficiency contradicts the objective function of the pool.
Additionally, when fees are distributed to stakers, they are only distributed to stakers with TST positions. This discourages the staking of EUROs, the asset the pool requires for processing liquidations.
Impact:
This pool's Total Value Locked (TVL) gives a misleading impression of liquidity depth. In truth, if a significant position in the pool is single-sided with EUROs, and there's a large liquidation that requires a substantial portion of the total EUROs in the pool, the liquidation wouldn't be completely processed. The EUROs will be at risk of under-collateralization due to the implied delay in selling off the collateral asset and covering the loss while the asset prices fall.
Proof of Concept:
If a user stakes $1M in EUROs and zero TST, the pool has a $1M TVL, but zero liquidation power, which is necessary for maintaining the stability of EUROs.
Tools Used:
Manual Review
Recommended Mitigation Steps:
Only factor EUROs positions in the stake()
calculation.
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.