Skip to content

"Max" button causes transaction revert on Base (USDC to ETH swap) #930

@Buidlor

Description

@Buidlor

Bug Report: "Max" button causes transaction revert on Base (USDC to ETH swap)

Date: 2026-02-07
Widget: RelayKit SwapWidget (@relayprotocol/relay-kit-ui)

What happened

  • User has 5.19619 USDC on Base
  • Pressed "Max" in the swap widget to swap USDC to ETH
  • Transaction was submitted but reverted on-chain
  • Reducing input to 5.19 USDC (slightly below max) -> transaction succeeds immediately

On-chain evidence

Expected behavior

The "Max" button should leave a small dust buffer or the solver should handle the full-balance edge case so the swap doesn't revert.

Environment

  • Chain: Base (8453)
  • Swap: USDC to ETH
  • Wallet: Privy embedded wallet (confirmation modals disabled)
  • Gas sponsorship: not enabled

SDK versions

  • @relayprotocol/relay-kit-ui: ^7.0.4
  • @relayprotocol/relay-kit-hooks: ^3.0.1
  • @relayprotocol/relay-sdk: ^4.0.1
  • @relayprotocol/relay-svm-wallet-adapter: ^15.0.1
  • @privy-io/react-auth: ^3.11.0
  • @privy-io/wagmi: ^2.0.2
  • viem: ^2.40.2
  • wagmi: ^2.19.4

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions