Spreads can be minted with a deactivated oracle
The oracle deactivation check was missing during option spread minting, so a user could still mint new options within spreads that relied on a deactivated oracle. This allowed bypassing the intended restriction that deactivated oracles should only permit closing positions.
Submitted by hyh
When deactivateOracle() is called for an oracle in OracleRegistry it is still available for option spreads minting.
This way a user can continue to mint new options within spreads that rely on an oracle that was deactivated. As economic output of spreads is close to vanilla options, so all users who already posses an option linked to a deactivated oracle can surpass this deactivation, being able to mint new options linked to it as a part of option spreads.
Proof of Concept
Oracle active state is checked with isOracleActive() during option creation in validateOptionParameters() and during option minting in _mintOptionsPosition().
It isn’t checked during spreads creation:
In other words besides vanilla option minting and creation all spectrum of operations is available for the deactivated oracle assets, including spreads minting, which economically is reasonably close to vanilla minting.
Recommended Mitigation Steps
If oracle deactivation is meant to transfer all related assets to the close only state then consider requiring oracle to be active on spreads minting as well in the same way it’s done for vanilla option minting:
0xca11 (Rolla) confirmed, resolved, and commented:
Resolved in RollaProject/quant-protocol#81.
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
Root cause
The oracle active state was not checked during spread minting, only during vanilla option creation and minting.
Impact
Users could continue to mint new options within spreads that rely on a deactivated oracle, bypassing the deactivation and potentially exposing the protocol to risks the deactivation was meant to prevent.
What the attacker needed
An oracle that has been deactivated; a user with an existing option linked to that oracle
The fix
The issue was fixed by requiring the oracle to be active during spread minting, as confirmed by the team.
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.
An oracle is a service that provides price data to a smart contract. The protocol had a way to turn off an oracle, which should stop people from creating new options that depend on it. However, the check was only applied when creating or minting single options, not when minting spreads (a combination of options), so users could still create new spread positions using the deactivated oracle.
What is Business logic?
The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.