How is a DCA position executed in the backend?

Creating a position in DCA means swapping a fixed amount an ERC-20 token for another ERC-20 at a regular interval. In order to do so, users needs to input certain properties:

  • Chain: Arbitrum, Ethereum, Polygon or BSC

  • Wallet: Metamask, Rainbow, WalletConnect, etc

  • From: ERC20 token to sell

  • To: ERC20 token to buy

  • Total Investment: Total amount of "From Token" you wish to put in the vault.

  • Duration: how many swaps to execute

  • Frequency: daily, weekly, hourly, etc

Whereas when it comes to executing a DCA position, the process takes place in the backend of the exchange's smart contract.

Here's how it typically works:

  1. The user specifies the inputs written above.

  2. Instead of executing each individual swap separately, which would be expensive in terms of gas fees, DZap aggregates all positions in the same pair and executes them together.

  3. To execute these swaps, DZap relies on swappers. These swappers executes the swaps. To encourage swappers execute the swaps.

  4. To get the best price for each swap bundle, DZap uses price oracles and aggregates liquidity from various DEX aggregators through our Meta aggregator.

  5. When a swap is executed, DZap rewards swapper optimistically. This incentivizes swappers to execute the swaps.

  6. Also, DZap shares a portion of the swap's protocol fees with the swapper.

Explore more about DZap today!

Website |Twitter |Mirror |Discord |Telegram |Reddit |Medium

Subscribe to DZap
Receive the latest updates directly to your inbox.
Mint this entry as an NFT to add it to your collection.
Verification
This entry has been permanently stored onchain and signed by its creator.