Skip to content
Business logic Audit finding Intermediate

Market-specific pause is not checked for sponsor

The treasury contract only checked its global pause flag, not the market-specific pause flag, when processing sponsorships. An attacker could sponsor a paused market, bypassing the intended pause restriction.

cmichel Follow

Originally disclosed on Code4rena

Submitted by cmichel

The treasury only checks its globalPause field but does not check its market-specific marketPaused field for Treasury.sponsor. A paused market contract can therefore still deposit as a sponsor using Market.sponsor and result in the market-specific pause not work correctly.

Recommend adding checks for marketPaused in the Treasury for sponsor.

mcplums (Reality Cards) commented:

I don’t think this is important but I guess it can’t hurt to block sponsorship if paused

Splidge (Reality Cards) confirmed but disagreed with severity:

I’m not sure why this is a severity 2? Maybe it should be lower. Sponsoring a market, whether paused or not, doesn’t come with an expectation to receive the funds back. So assets are not at risk here.

Splidge (Reality Cards) resolved:

There have been changes made to marketPaused and how markets are created due to other issues that have been found. By default markets are now created in a paused state and it’d be useful to be able to sponsor them before the governors approve them. It’s a nice thing for the sponsorship to be in place before anybody interacts with the contract. I have however made changes such that is the market pause is ever turned on by the Treasury owner then the sponsor function will revert. Changes here

The original report as published on Code4rena, by cmichel. 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

A paused market could still receive sponsorships, so the market-specific pause did not fully prevent deposits; however, the sponsor's funds were not at risk because sponsorship does not imply a right to get funds back.

What the attacker needed

A paused market; attacker can call sponsor

The fix

The treasury was changed so that if the market pause is turned on by the treasury owner, the sponsor function reverts.

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.

A smart contract has a pause feature to stop certain actions. Here, the treasury contract checked only a global pause switch, not the per-market pause switch, so someone could still sponsor a paused market. This means the pause didn't fully work as intended.

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.

More by cmichel

View all

196 more disclosed reports, best first.

More from Reality Cards (round 2)

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Business logic flaws

The lesson behind this report.

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.