Skip to content
Business logic Audit finding Intermediate

StabilizerNode Will Mint An Incentive For Triggering An Auction Even If An Auction Exists Already

The StabilizerNode contract rewards the caller for triggering an auction even when an auction already exists but is inactive, because the check only tests whether the auction is active rather than whether it exists. An attacker could repeatedly call the stabilize function to mint free Malt tokens through the caller incentive.

leastwood Follow

Originally disclosed on Code4rena

Submitted by leastwood

_startAuction utilises the SwingTrader contract to purchase Malt. If SwingTrader has insufficient capital to return the price of Malt back to its target price, an auction is triggered with the remaining amount. However, no auction is triggered if the current auction exists, but msg.sender is still rewarded for their call to stabilize.

Proof of Concept

_shouldAdjustSupply initially checks if the current auction is active, however, it does not check if the current auction exists. There is a key distinction between the auctionActive and auctionExists functions which are not used consistently. Hence, an auction which is inactive but exists would satisfy the edge case and result in triggerAuction simply returning.

Recommended Mitigation Steps

Consider using auctionExists and auctionActive consistently in StabilizerNode and Auction to ensure this edge case cannot be abused.

0xScotch (sponsor) confirmed

Alex the Entreprenerd (judge) commented:

The warden found a way to effectively mint free malt by spamming the caller incentive by abusing a specific edge case.

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

Root cause

The contract checks whether an auction is active instead of whether it exists, so an inactive but existing auction still triggers the caller reward.

Impact

An attacker could mint free Malt tokens by repeatedly claiming the caller incentive, as confirmed by the judge.

What the attacker needed

An inactive but existing auction; ability to call stabilize repeatedly

The fix

The contracts should use `auctionExists` and `auctionActive` consistently to prevent this edge case from being abused.

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 pays a reward to anyone who starts an auction when the token price is off target. The code mistakenly pays the reward even when an auction already exists but is not currently running, so someone can call the function over and over to collect free tokens without doing the intended work.

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 leastwood

View all

70 more disclosed reports, best first.

More from Malt Protocol - Versus contest

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.