Multi-Buy
Goodiebag app uses token data, such as daily volume or tokens recently added to a DEX, from the graph. Each swap has 3 potential transaction builders: first, it will try to build the swap using the 0x api (Matcha) to get the best possible price. If that fails for whatever reason, it will attempt to create the swap via the Uniswap Smart Router or Sushiswap directly, depending on which DEX the token is on.
When the swaps are being executed in the smart contract, if one or more of the swaps fail, the transaction will not be reverted; instead, the unspent ETH will be refunded to the user at the end of the transaction. This all happens within the multi-buy transaction, so no additional refund claim is needed.
Last updated