0x02 · experience

Asset Scooper

Cofounder

Built a wallet-consolidation platform that returns stablecoin for meme and dust tokens during Base Onchain Summer.

stack

Next.js TypeScript Solidity ERC-4337 Chakra UI Wagmi / Viem ParaSwap Framer Motion

overview

Asset Scooper batches all of it into a single on-chain transaction. Connect your wallet, select the tokens you want to offload, pick a destination asset, and confirm once. One signature. One gas fee. Done.

The magic underneath is ERC-4337 smart accounts combined with ParaSwap's DEX aggregator. The interface constructs a UserOperation that bundles multiple swap calldata into a single atomic execution — if any swap fails, the whole batch reverts, protecting the user from partial fills.

how it works

01 · Portfolio Discovery

On load, the app queries the Covalent API to fetch all token balances for the connected address across supported chains. Tokens are filtered, sorted by USD value, and rendered in a selectable list — giving the user a full picture of what they're holding.

02 · Swap Route Aggregation

For each selected token, the app calls ParaSwap's @paraswap/core SDK to find the optimal swap route to the target asset. ParaSwap aggregates across Uniswap, Curve, Balancer, and dozens of other liquidity sources to minimize slippage and maximize output.

03 · Batch Transaction via Smart Accounts

This is where the core innovation lives. Instead of submitting N separate transactions:

  • The app uses Coinbase OnchainKit (@coinbase/onchainkit) to interact with the user's ERC-4337 smart account (or deploy one if needed).
  • All swap calldata — including token approvals — are packed into a single executeBatch UserOperation.
  • The UserOperation is sent to a bundler, which submits it on-chain as one atomic transaction.
  • A paymaster can optionally sponsor gas, enabling a gasless UX.

04 · Transaction Lifecycle

Real-time status is tracked via wagmi's useWaitForTransactionReceipt hook and TanStack Query for caching and refetching. The UI reflects pending, confirmed, and failed states with smooth transitions powered by Framer Motion.

01 · Requirement Analysis

Wallets accumulate meme and dust tokens individually unprofitable to sell — gas outweighs value. During Base Onchain Summer the goal was one action that sweeps scattered holdings and returns USDC with predictable slippage.

02 · Architecture Discovery

Surveyed Base DEX routers, allowance flows (approve / Permit2) and dust thresholds. Settled on an aggregator swap path that pulls each token and routes it through the best available pool, settling in a single transaction.

03 · Software Architecture

An entrypoint sweep contract orchestrates per-token approvals, minimum-out swaps across Base pools, and a final USDC settlement, with pluggable adapters behind a router interface for different pool types.

04 · Development Principles

Checks-Effects-Interactions ordering on every external call, reentrancy guards across entry points, strict slippage / minimum-out bounds, immutable adapters, and fail-fast reverts so partial state never commits.

05 · Impact

Delivered a usable consolidation flow during the hackathon, turning scattered holdings into a single stablecoin balance in one transaction.

WALLET SWAP USDC