Tigris Trade contest - yixxas'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: 75/84

Findings: 1

Award: $11.69

🌟 Selected for report: 0

🚀 Solo Findings: 0

Awards

11.6941 USDC - $11.69

Labels

bug
2 (Med Risk)
satisfactory
duplicate-655

External Links

Lines of code

https://github.com/code-423n4/2022-12-tigris/blob/588c84b7bb354d20cbca6034544c4faa46e6a80e/contracts/utils/TradingLibrary.sol#L113

Vulnerability details

Impact

latestAnswer is depreciated and no longer supported by chainlink. It can return stale data or return a value of 0 when an error occurs. This will give us an incorrect pricing or cause verifyPrice() to revert, preventing the protocol from functioning.

Proof of Concept

According to chainlink docs, latestAnswer is depreciated and no longer supported. We should use latestRoundData instead to receive our price feed.

Tools Used

Manual Review

Use the latestRoundData api instead. It is also recommended to check the for stale data as well as incomplete rounds. For example,

(uint80 roundID, int256 price, , uint256 timeStamp, uint80 answeredInRound) = oracle.latestRoundData();
require(answeredInRound >= roundID, "Incomplete round");
require(timeStamp != 0, "Feed is stale");

#0 - c4-judge

2022-12-20T16:34:52Z

GalloDaSballo marked the issue as duplicate of #655

#1 - c4-judge

2023-01-22T17:31:00Z

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