The Standard

The Standard
DeFiHardhat
20,000 USDC
View results
Submission Details
Severity: low
Invalid

`Stake()` Not Accounting for Some EUROs in the Pool Decreases the Efficiency of the Pool

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.


Impact:
The Total Value Locked (TVL) in this pool 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.

Tools Used:

  • Manual Review


Recommended Mitigation Steps:
Only factor EUROs positions in the stake() calculation.

function stake(Position memory _position) private pure returns (uint256) {
- return _position.TST > _position.EUROs ? _position.EUROs : _position.TST;
+ return _position.EUROs;
}
Updates

Lead Judging Commences

hrishibhat Lead Judge almost 2 years ago
Submission Judgement Published
Invalidated
Reason: Design choice
Assigned finding tags:

informational/invalid

Support

FAQs

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

Give us feedback!