Skip to content

Latest commit

 

History

History
72 lines (47 loc) · 2.54 KB

File metadata and controls

72 lines (47 loc) · 2.54 KB

Dandy Caramel Tortoise

Medium

Lack of sequencer uptime check can cause lenders to loose assets in L2

Summary

Lack of sequencer uptime check can cause the dutch auction for collateral to be settled at very low prices making the lenders loose their assets

Root Cause

The liquidateDefaultedLoanWithIncentive function performs a Dutch auction in case of defaulted loans

    function liquidateDefaultedLoanWithIncentive(
        uint256 _bidId,
        int256 _tokenAmountDifference
    ) external whenForwarderNotPaused whenNotPaused bidIsActiveForGroup(_bidId) nonReentrant onlyOracleApprovedAllowEOA {
       * @dev As time approaches infinite, the output approaches -1 * AmountDue .  
    */
    function getMinimumAmountDifferenceToCloseDefaultedLoan(
        uint256 _amountOwed,
        uint256 _loanDefaultedTimestamp
    ) public view virtual returns (int256 amountDifference_) {
        require(
            _loanDefaultedTimestamp > 0,
            "Loan defaulted timestamp must be greater than zero"
        );
        require(
            block.timestamp > _loanDefaultedTimestamp,
            "Loan defaulted timestamp must be in the past"
        );


        uint256 secondsSinceDefaulted = block.timestamp -
            _loanDefaultedTimestamp;


        //this starts at 764% and falls to -100% 
        int256 incentiveMultiplier = int256(86400 - 10000) -
            int256(secondsSinceDefaulted);

And the team plans to launch on L2's like Arbitrum, Base etc which can have sequencer outages. In case the sequencer is down, liquidations won't happen until the sequencer comes back or the force inclusion delay passes. During this time the auction's price will have decreased significantly causing the auction to be settled at a very low price leading to losses for the lenders. Currently the price goes from (8.64x amountDue to 0 in 1 day) and delays in matter of hours can have significant impact on the price considering the lower range of price spectrum is the most likely one

Internal pre-conditions

No response

External pre-conditions

  1. Sequencer outage

Attack Path

No response

Impact

Lenders will loose assets due to unfair auction

PoC

No response

Mitigation

Check for sequencer uptime similar to paused time