Skip to content
Request an audit

‹ All findings

Yield form LRTs are forever stuck in the protocol and cannot be withdrawn

MediumAutonomint·Sherlock · Hedged stablecoin · 4th December 2024CodebaseM-26

Summary

During borrower liquidation (liquidationType1()) and withdrawal from the CDS, the yield from LRTs is updated and stored in the treasury.

Root Cause

solidity
File: CDSLib.sol
667:      @>         interfaces.treasury.updateYieldsFromLiquidatedLrts( // @audit SUBMITTED-HIGH: these funds are stuck forever in the treasury
668:                     weETHAmount - ((weETHAmountInETHValue * 1 ether) /  params.weETH_ExchangeRate) + 
669:                     rsETHAmount - ((rsETHAmountInETHValue * 1 ether) /  params.rsETH_ExchangeRate)
670:                 );


File: borrowLiquidation.sol
265:         uint256 yields = depositDetail.depositedAmount - ((depositDetail.depositedAmountInETH * 1 ether) / exchangeRate);
266: 
267:         // Update treasury data
268:         treasury.updateTotalVolumeOfBorrowersAmountinWei(depositDetail.depositedAmountInETH);
269:         treasury.updateTotalVolumeOfBorrowersAmountinUSD(depositDetail.depositedAmountUsdValue);
270:         treasury.updateDepositedCollateralAmountInWei(depositDetail.assetName, depositDetail.depositedAmountInETH);
271:         treasury.updateDepositedCollateralAmountInUsd(depositDetail.assetName, depositDetail.depositedAmountUsdValue);
272:         treasury.updateTotalInterestFromLiquidation(totalInterestFromLiquidation);
273:  @>     treasury.updateYieldsFromLiquidatedLrts(yields); // @audit ??? questionable

The problem is that there is no way to for the protocol to retrieve these funds neither is it distributed to users elsewhere

Impact

Yield form LRTs is stuck in the treasury without a way to withdraw them

Mitigation

Consider inplementing a mechanism to withdraw or distribute this yield