Batch Swap

Decentralized finance (DeFi) is characterized by numerous processes that require initiating and awaiting transactions. Examples include making multiple swaps, depositing into LPs, purchasing VCs for staking or voting, and locking and voting operations. Some protocols deploy a separate contract, known as a zap, to streamline these processes. However, using an additional contract often results in considerable gas consumption, and it lacks customizability as it is designed for a single function. Velocore, however, natively supports batch swaps and is intentionally designed to permit negative balances mid-process. This design allows DEX aggregators and users to conveniently execute multiple actions through a single transaction.

These actions include:

  1. Swapping ETH for USDC and USDT to create a USDC-USDT LP and subsequently staking it on the gauge.

  2. Performing arbitrage within the DEX without resorting to a flashloan, is made possible by the acceptance of a negative balance prior to the completion of the batch.

  3. Allowing DEX aggregators to simultaneously perform A->B and A->C->B swaps without token transfer in between.

  4. Voting directly with ETH by batching three transactions: swap ETH for VC, lock VC, then vote.

  5. Harvesting all and compounding to any LPs.

These mechanisms provide significant gas savings and reduce the time required for transactions. Moreover, by executing actions within a single block, concerns about price fluctuations interrupting the intended action are mitigated.

In the future, we anticipate collaborating with account abstraction wallets to unlock even more synergies and optimize our DeFi operations.

Last updated