Skip to content
Business logic Audit finding Intermediate

Incorrect gas claiming logic in ThrusterPoolDeployer

The ThrusterPoolDeployer's claimGas function passed the zero address to Blast's claimMaxGas instead of its own address, so the call would always fail and the contract could never reclaim the gas it generated. An attacker could not exploit this directly, but the deployer permanently lost the gas it was entitled to.

EV_om Follow with oakcobalt and rvierdiiev

Originally disclosed on Code4rena

Submitted by EV_om, also found by oakcobalt and rvierdiiev

From the audit documentation:

All contracts that use gas should comply with the Blast gas claim logic.

However, the ThrusterPoolDeployer contains a flaw in the implementation of claimGas() which will prevent it from ever claiming the gas it induces. The function attempts to claim gas for the zero address (address(0)) instead of the deployer’s own address (address(this)):

    function claimGas(address _recipient) external override onlyFactory returns (uint256 amount) {
        amount = IBlast(BLAST).claimMaxGas(address(0), _recipient);
    }

This misconfiguration prevents the ThrusterPoolDeployer from reclaiming any gas, as the IBlast.claimMaxGas() call will always fail when provided with the zero address.

Proof of Concept

https://github.com/blast-io/blast/blob/master/blast-optimism/packages/contracts-bedrock/src/L2/Blast.sol#L274-L283

/**
 * @notice Claims gas available to be claimed at max claim rate for a specific contract. Called by an authorized user
 * @param contractAddress The address of the contract for which maximum gas is to be claimed
 * @param recipientOfGas The address of the recipient of the gas
 * @return The amount of gas that was claimed
 */
function claimMaxGas(address contractAddress, address recipientOfGas) external returns (uint256) {
	require(isAuthorized(contractAddress), "Not allowed to claim max gas");
	return IGas(GAS_CONTRACT).claimMax(contractAddress, recipientOfGas);
}

Recommended Mitigation Steps

Use address(this) rather than 0.

jooleseth (Thruster) confirmed and commented:

I agree, we caught this issue a few days ago too. Blast had initially in their docs specified it should be address(0) instead of address(this) for gas claiming and we missed changing this in the audit commit freeze. Will agree to a Medium Risk bug for this, as it doesn’t affect any user funds.


The original report as published on Code4rena, by EV_om. 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 claimGas function passed address(0) as the contract address to IBlast.claimMaxGas instead of address(this), and Blast rejects unauthorised addresses.

Impact

The deployer could never reclaim the gas it generated, so those funds were lost to the contract; no user funds were affected.

What the attacker needed

None

The fix

The call should pass address(this) rather than the zero address; the project confirmed the issue and agreed it was a medium-risk bug.

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.

Some blockchains let a contract collect a small refund of the fees it paid when it runs. To collect, the contract must name itself as the account that earned the refund. Here the contract named an empty, non-existent account instead, so the refund request was always rejected and the money stayed unclaimed.

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 EV_om

View all

23 more disclosed reports, best first.

More from Thruster Invitational

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.