Skip to content

AMMDelete: preflight performs no validation on asset pair #6663

@mvadari

Description

@mvadari

Issue Description

In AMMDelete::preflight (src/libxrpl/tx/transactors/dex/AMMDelete.cpp, lines 16–19), the function returns tesSUCCESS without any validation:

NotTEC
AMMDelete::preflight(PreflightContext const& ctx)
{
    return tesSUCCESS;
}

Every other AMM transactor (AMMCreate, AMMDeposit, AMMWithdraw, AMMBid, AMMVote) calls invalidAMMAssetPair in its preflight. AMMDelete skips this, allowing trivially malformed transactions (e.g., sfAsset == sfAsset2) to pass preflight and only fail at preclaim.

Steps to Reproduce

Submit an AMMDelete transaction with sfAsset equal to sfAsset2. It will pass preflight and only be rejected at preclaim.

Expected Result

AMMDelete::preflight should call invalidAMMAssetPair (and potentially preflight2, the standard common checks) to reject malformed transactions early and avoid wasting consensus resources.

Actual Result

Malformed AMMDelete transactions pass preflight and consume consensus resources before being rejected at preclaim.

Environment

All versions with AMM support (XLS-30).

Supporting Files

N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    AI TriageBugs and fixes that have been triaged via AI initiatives

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions