Paymagic Labs

Posted on Feb 19, 2022Read on Mirror.xyz

PRD: DustSweeper (🧹,🧹)

Summary

DustSweeper (🧹,🧹) allows users to swap small balance tokens (”dust”) for ETH without expensive gas transactions. Users just have to approve() the tokens they’d like to sell, and “market taker” bots execute the swap.

Problem

Many Ethereum mainnet users have low-balance tokens (<$500) in their wallets from old trades, airdrops, and trying out apps back when gas was cheap. They’d like to sell these tokens for ETH to clean out these wallets but gas prices are prohibitively high for swapping on Uniswap/Sushi/etc.

Target Users

  • 🐷 Ethereum OG users want to get rid of low-balance tokens in their wallets.
  • 🤖 Market takers bots want to buy tokens at a discount and/or run arbitrage.

DustSweeper Architecture

User Validation

A couple Twitter surveys of “Ethereum Super Users” revealed a fairly high interest in this application and a willingness to pay a fee in the ~10% range.

Ethereum OGs were supportive

User Stories

🐳 Ethereum OG user (maker)

  1. User comes to the site, connects their wallet, and sees all tokens they’re holding.
  2. The user selects the tokens they want to sell and goes through a series of approvals(). Each approval costs ~$8-15 in gas.
  3. In the next hour or two, market taker bots will buy the tokens for ETH at a discount (~10%) and the user will see the ETH appear in their wallet.
  4. Done! And all approvals are removed from the contract.

🤖 Market Taker Bot (taker)

  1. The bot monitors Approval Events on all tokens that have Chainlink price feeds, looking for the DustSweeper contract as the spender.
  2. If a bundle of approved tokens will be profitable given the gas cost, execute the trade. 🤝
  3. Optionally, trade the tokens for ETH on a Dex to reduce pricing risk.

Solution

To solve this problem, a new automated market maker (AMM) is proposed that uses Approval Events as an order book and Chainlink oracles, with a fixed discount, for pricing.

Makers pay the minimal amount of gas possible, only for the token approve() call, similar to CowSwap. Makers approve the DustSweeper.sol contract, which has minimal functionality to reduce the attack surface of vulnerabilities.

Taker bots monitor approval events where spender === DustSweeper.address and initiates a trade once it finds a profitable group of orders, minus the needed gas cost.

Profit = SUM(tokenOrders)*0.1 - gasCost

For the ETHDenver Hackathon, DustSweeper.sol, a React frontend, and a reference bot implementation was built and run on a fork of mainnet. If the project gathers support, it’ll be deploy to mainnet for public usage.

DustSweeper Architecture

Future Development

For future iterations, the following features will be explored:

  • Dynamic discount - The discount would change between 5-25% based on the maker’s preference and the time that the order has been open. So the longer the token has been approved and unfulfilled, the higher the discount.
  • Integrate with other AMMs - Integrate with Uniswap v3 and Cowswap to source more takers.
  • Gasless Orders - Use meta-transactions to pay the gas for sweepDust() from DustDAO, reducing the cost and friction for Taker Bots considerably.
  • Protocol token and fee - A protocol token ($DUST) could be added to further incentivize the taker bots to fulfill orders quickly. And a 1-2% fee could be taken on each swap to build the DUST liquidity pool.
  • Batch approvals - meta-transactions and permit() tokens could be explored to further reduce the gas needed for makers to clean their wallets.
  • Time-gated windows of liquidity - For example, run a marketing campaign for #CleanWalletWednesday to encourage a lot of orders in a fixed time window to generate a lot of liquidity for taker bots.

Thanks & Contribute

Thanks to the projects that inspired DustSweeper like CowSwap, Uniswap, and Balancer and thank you to the ETHDenver community for an awesome event.

If you’d like to see DustSweeper deployed to mainnet and a $DUST token launch, consider contributing to the crowdfund below. Crowdfund contributors will receive 34% ownership of the DAO at launch (with 33% to the DUST treasury and 33% to liquidity incentives).

If the crowdfund hits 50 ETH in commitments, we will bootstrap Dust DAO and launch DustSweeper Alpha on mainnet under the DAO’s governance. If not, we’ll refund all contributions. ✌️

crowdfund://0xbD28A5EC521CD92c2A5B3d05de728720cD59D022?features=overview,backers