Tapioca DAO - ck's results

The first ever Omnichain money market, powered by LayerZero.

General Information

Platform: Code4rena

Start Date: 05/07/2023

Pot Size: $390,000 USDC

Total HM: 136

Participants: 132

Period: about 1 month

Judge: LSDan

Total Solo HM: 56

Id: 261

League: ETH

Tapioca DAO

Findings Distribution

Researcher Performance

Rank: 104/132

Findings: 1

Award: $46.37

🌟 Selected for report: 0

🚀 Solo Findings: 0

Findings Information

🌟 Selected for report: peakbolt

Also found by: Breeje, SaeedAlipoor01988, ayeslick, ck, ladboy233, ltyu, vagrant

Labels

bug
2 (Med Risk)
satisfactory
duplicate-1169

Awards

46.3738 USDC - $46.37

External Links

Lines of code

https://github.com/Tapioca-DAO/tapioca-bar-audit/blob/2286f80f928f41c8bc189d0657d74ba83286c668/contracts/markets/bigBang/BigBang.sol#L263-L268

Vulnerability details

Impact

When BigBang::repay is paused, users will be unfairly liquidated. In periods of pausing users should be allowed to repay their loans to prevent going below the liquidation threshold.

Proof of Concept

The function BigBang::repay is implemented with pausing functionality as follows:

    function repay(
        address from,
        address to,
        bool,
        uint256 part
    ) public notPaused allowedBorrow(from, part) returns (uint256 amount) {

The issue is that during a period where the protocol is paused, the collateral value of a user can substantially decrease.

When the protocol is unpaused, the user would find themselves in a situation where they can be liquidated.

Opportunistic liquidators would wait for the unpause to happen and immediately liquidate the users before the get a chance to repay.

The protocol should therefore allow users to repay their loans even when the protocol is paused to prevent this.

Tools Used

Manual Review.

Remove pause functionality from BigBang::repay.

Assessed type

Other

#0 - c4-pre-sort

2023-08-04T23:43:55Z

minhquanym marked the issue as duplicate of #1169

#1 - c4-judge

2023-09-29T19:16:54Z

dmvt marked the issue as satisfactory

AuditHub

A portfolio for auditors, a security profile for protocols, a hub for web3 security.

Built bymalatrax © 2024

Auditors

Browse

Contests

Browse

Get in touch

ContactTwitter