Tigris Trade contest - ali_shehab's results

A multi-chain decentralized leveraged exchange featuring instant settlement and guaranteed price execution on 30+ pairs.

General Information

Platform: Code4rena

Start Date: 09/12/2022

Pot Size: $90,500 USDC

Total HM: 35

Participants: 84

Period: 7 days

Judge: GalloDaSballo

Total Solo HM: 12

Id: 192

League: ETH

Tigris Trade

Findings Distribution

Researcher Performance

Rank: 47/84

Findings: 1

Award: $163.00

🌟 Selected for report: 0

🚀 Solo Findings: 0

Findings Information

Labels

bug
3 (High Risk)
satisfactory
duplicate-23

Awards

162.9965 USDC - $163.00

External Links

Lines of code

https://github.com/code-423n4/2022-12-tigris/blob/main/contracts/Lock.sol#L84-L92

Vulnerability details

Impact

amount of tokens increased in the contract is updated when calling the lock function, and is decreased when calling the release function. However, since a user can add an amount when calling the extendLock function (see this function https://github.com/code-423n4/2022-12-tigris/blob/main/contracts/Lock.sol#L79-L92 ) ( see the comment mention that user can increase time and amount ), but the totalLocked[_asset] is not increased which can lead to totalLocked[_asset] to being in negative.

Proof of Concept

  1. Bob locked 100 tokens for 10 days. totalLocked[_asset] will be 100.
  2. Bob decided to extendLock and add more tokens so he added 50 tokens, so now Bob has 150 tokens, but the totalLocked[_asset] is still 100.
  3. Now when he calls release either the totalLocked[_asset] will revert.

Tools Used

Vscode

increase totalLocked[_asset] when calling the extendLock.

#0 - c4-judge

2022-12-21T15:02:38Z

GalloDaSballo marked the issue as duplicate of #23

#1 - c4-judge

2023-01-22T17:38:07Z

GalloDaSballo 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