Rigor Protocol contest - Throne6g's results

Community lending and instant payments for new home construction.

General Information

Platform: Code4rena

Start Date: 01/08/2022

Pot Size: $50,000 USDC

Total HM: 26

Participants: 133

Period: 5 days

Judge: Jack the Pug

Total Solo HM: 6

Id: 151

League: ETH

Rigor Protocol

Findings Distribution

Researcher Performance

Rank: 110/133

Findings: 1

Award: $40.62

🌟 Selected for report: 0

πŸš€ Solo Findings: 0

Lines of code

https://github.com/code-423n4/2022-08-rigor/blob/b17b2a11d04289f9e927c71703b42771dd7b86a4/contracts/HomeFi.sol#L157-L167

Vulnerability details

Impact

The replaceAdmin() function in HomeFi.sol updates admin role address in one-step. If an incorrect address is mistakenly used then future administrative access or even recovering from this mistake is prevented because all onlyAdmin modifier functions require _msg.sender to be the incorrectly used admin address (for which private keys may not be available to sign transactions). In such a case, contracts would have to be redeployed.

Proof of Concept

https://github.com/code-423n4/2022-08-rigor/blob/b17b2a11d04289f9e927c71703b42771dd7b86a4/contracts/HomeFi.sol#L157-L167

Suggest using a two-step process where the new admin address first claims ownership in one transaction and a second transaction from the new admin address takes ownership.

#0 - horsefacts

2022-08-06T22:19:37Z

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