Skip to content
Business logic Audit finding Intermediate

`UniV3Decomposer` will always revert due to incorrect `RFTPayer` support and lack of token approvals to `MakerFacet`

The UniV3Decomposer contract inherits the RFTPayer interface but never implements the ERC165 supportsInterface function, so the Maker contract does not recognise it as a valid payer and falls back to transferFrom. Because the decomposer never approves its asset tokens to MakerFacet, every call to decompose reverts, making the core feature unusable.

KlosMitSoss Follow with SOPROBRO, blockace and 3 others

Originally disclosed on Sherlock

Source: https://github.com/sherlock-audit/2025-09-ammplify-judging/issues/415

Found by

KlosMitSoss, SOPROBRO, blockace, davuka, panprog, tinnohofficial

Summary

UniV3Decomposer takes Uniswap v3 NFT position and converts it into Ammplify Maker position. This is done by burning NFT position into corresponding asset tokens and then calling Maker.newMaker with the same position parameters. Ammplify Maker supports RFTPayer interface for contracts as well as direct token transfers for EOA and contracts not supporting RFTPayer interface. While UniV3Decomposer inherits from RFTPayer, it fails to conform to ERC165, because it doesn't have the correct supportsInterface function. It is not enough to just inherit from RFTPayer, because this only sets up interfaces storage in the constructor, but doesn't actually add the supportsInterface function.

As a result, when Maker.newMaker is called, it doesn't recognize UniV3Decomposer as correct RFTPayer and falls back to simply transferring tokens from UniV3Decomposer using transferFrom. The issue is that UniV3Decomposer doesn't approve asset tokens to MakerFacet, thus transferFrom will always revert with lack of token approval when MakerFacet tries to transfer tokens from decomposer contract to mint uniswap liquidity.

Root Cause

UniV3Decomposer simply inherits from RFTPayer, there are is no supportsInterface function in the contract: https://github.com/sherlock-audit/2025-09-ammplify/blob/main/Ammplify/src/integrations/UniV3Decomposer.sol#L22

Internal Pre-conditions

None.

External Pre-conditions

None.

Attack Path

UniV3Decomposer will always revert when calling decompose function. Note: the tests do not catch this, because MockERC20 contract ignores approvals and always executes transferFrom.

Impact

Core functionality of decomposing uniswap V3 NFT positions never works, rendering the composer contract useless.

Mitigation

Add supportsInterface function similar to NFTManager:

Solidity
    function supportsInterface(bytes4 interfaceId) public view override returns (bool) {
        return super.supportsInterface(interfaceId) || Auto165Lib.contains(interfaceId);
    }

Additionally, it's recommended to update MockERC20 contract with correct approvals usage and checks to catch reverts in all the other cases.

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

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

Likely the contract inherits RFTPayer but omits the ERC165 supportsInterface implementation, so it is not detected as an RFTPayer and the fallback transferFrom path fails for lack of approvals.

Impact

The decompose feature always reverts, so the composer contract cannot perform its core function at all.

What the attacker needed

None

The fix

It should be fixed by adding a supportsInterface function that also reports the RFTPayer interface, and by making the mock token enforce approvals so tests catch such reverts.

How it was found

  1. Call the decompose function on UniV3Decomposer with a Uniswap v3 NFT position.
  2. The contract burns the NFT into the underlying asset tokens.
  3. It calls Maker.newMaker with the same position parameters.
  4. Maker does not detect RFTPayer support and attempts transferFrom on the decomposer.
  5. The transfer reverts because no token approval was given to MakerFacet.

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 contract here is meant to hand tokens to another contract as payment. The receiving contract first asks 'are you a special payer type?' by calling a small check function. The decomposer never answers that check properly, so the receiver tries the ordinary way of pulling tokens, which needs a prior permission (an approval) that was never given, and the whole action fails.

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 KlosMitSoss

View all

25 more disclosed reports, best first.

More from Ammplify

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.