Inverse Finance contest - Jujic's results

Rethink the way you borrow.

General Information

Platform: Code4rena

Start Date: 25/10/2022

Pot Size: $50,000 USDC

Total HM: 18

Participants: 127

Period: 5 days

Judge: 0xean

Total Solo HM: 9

Id: 175

League: ETH

Inverse Finance

Findings Distribution

Researcher Performance

Rank: 83/127

Findings: 2

Award: $34.01

🌟 Selected for report: 0

🚀 Solo Findings: 0

Findings Information

Awards

33.634 USDC - $33.63

Labels

bug
2 (Med Risk)
satisfactory
duplicate-301

External Links

Lines of code

https://github.com/code-423n4/2022-10-inverse/blob/3e81f0f5908ea99b36e6ab72f13488bbfe622183/src/DBR.sol#L349

Vulnerability details

Impact

Allows operator to mint unlimited amount ADR tokens to any address

Proof of Concept

https://github.com/code-423n4/2022-10-inverse/blob/3e81f0f5908ea99b36e6ab72f13488bbfe622183/src/DBR.sol#L349-L352

function mint(address to, uint amount) public { require(minters[msg.sender] == true || msg.sender == operator, "ONLY MINTERS OR OPERATOR"); _mint(to, amount); }

Set the minters as immutable to provide stronger security guarantees

#0 - c4-judge

2022-11-05T22:14:22Z

0xean marked the issue as duplicate

#1 - Simon-Busch

2022-12-05T15:36:13Z

Issue marked as satisfactory as requested by 0xean

#2 - c4-judge

2022-12-07T08:22:05Z

Simon-Busch marked the issue as duplicate of #301

Lines of code

https://github.com/code-423n4/2022-10-inverse/blob/3e81f0f5908ea99b36e6ab72f13488bbfe622183/src/Oracle.sol#L82

Vulnerability details

Impact

The Chainlink API (latestAnswer) used in the Oracle contract is deprecated:

Please see API Reference for the latest Price Feed API. Chainlink Docs

Proof of Concept

uint price = feeds[token].feed.latestAnswer();

Tools Used

Use the latestRoundData function to get the price instead. Add checks on the return data with proper revert messages if the price is stale or the round is uncomplete, for example:

(uint80 roundID, int256 price, , uint256 timeStamp, uint80 answeredInRound) = feeds[token].feed.latestRoundData(); require(answeredInRound >= roundID, "..."); require(timeStamp != 0, "...");

#0 - neumoxx

2022-10-31T08:53:08Z

Duplicate of #601

#1 - c4-judge

2022-11-05T17:54:37Z

0xean marked the issue as duplicate

#2 - Simon-Busch

2022-12-05T15:24:31Z

Issue marked as satisfactory as requested by 0xean

#3 - c4-judge

2022-12-07T08:14:13Z

Simon-Busch marked the issue as duplicate of #584

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