Skip to content
Smart contracts Audit finding Intermediate

No use of upgradeable SafeERC20 contract in Controller.sol

The smart contract Controller.sol uses a non-upgradeable version of OpenZeppelin's SafeERC20 library while otherwise being designed for upgradeability. This inconsistency could cause storage layout issues or other problems when the contract is upgraded.

jayjonah8 Follow

Originally disclosed on Code4rena

Submitted by jayjonah8

Controller.sol makes use of Open Zeppelins ReentrancyGuardUpgradeable.sol in the file but does not use an upgradeable version of SafeERC20.sol

Proof of Concept

Controller.sol#L5

Recommended Mitigation Steps

Make use of Open Zeppelins upgradeable version of the SafeERC20.sol contract.

0xca11 (Rolla) resolved and commented:

Resolved in RollaProject/quant-protocol#76.


The original report as published on Code4rena, by jayjonah8. Images and videos are our own copies; raw HTML is shown as text. View it on Code4rena.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Impact

This could lead to storage layout issues or other upgrade-related problems, but the report does not specify a concrete exploit.

What the attacker needed

None

The fix

The issue was fixed by using OpenZeppelin's upgradeable version of SafeERC20.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

Smart contracts can be designed to be upgradeable, meaning their code can be changed later. When using libraries, it's important to use versions that are also upgradeable to avoid conflicts. This report points out that one library was not the upgradeable version, which could cause problems if the contract is upgraded.

What is Smart contracts?

Flaws in on-chain code that let an attacker drain funds, freeze them or break the protocol's accounting.

More by jayjonah8

View all

18 more disclosed reports, best first.

More from Rolla contest

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Smart contract vulnerabilities

The lesson behind this report.

Flaws in on-chain code that let an attacker drain funds, freeze them or break the protocol's accounting.