DZap Documentation
  • 🌐Overview
  • Features
    • Aggregation
      • Usecases
      • Fee Structure
      • Chains, Bridge and Liquidity
      • Different Transaction Status
      • Price Imapct Handling
      • Technical Details
    • DCA
      • Creating Positions
      • Additional Actions
      • Swap properties
      • Fees
      • Supported Tokens
    • Zapping (Coming soon)
      • Use Cases
      • Liquidity Migration
      • Supported Routes
  • Protocol
    • Contract address
    • Dzap Aggregation API
    • Uniswap Permit V2
    • Backend API
  • Terms & Security
    • Troubleshooting & Self Serve Guide
    • Terms
    • Audit Reports
    • Privacy
    • Security
  • Tutorial
    • Batch Swap via DEX Aggregator
    • Batch swap via Bridge Aggregator
    • Minting LST from Any Chain
  • Socials
    • 🌐Website
    • 🐦Twitter
    • 👾Discord
    • Ⓜ️Medium
  • DZap SDK
    • Dollar Cost Averaging (DCA)
      • Overview
      • Installation
      • Quick Start
      • Usage Guide
      • Methods
      • Data Types
Powered by GitBook
On this page
  • Prerequisites
  • Allowance and Approval
  1. DZap SDK
  2. Dollar Cost Averaging (DCA)

Installation

To install the DZapDcaClient SDK, use either npm or yarn:

npm install dzap-dca-client 
# or
yarn add dzap-dca-client 

Prerequisites

Before using the DCA functionalities, it's essential to grant token allowances to the DZap DCA contract. The DZapDcaClient SDK supports two approval methods:

  • Permit2 Approval: Recommended for most use cases, this standard method enables users to authorize the DZap DCA contract to manage tokens by signing a permit.

  • ERC20 Token Approval: In this method, users directly approve token allowance to the DZap DCA contract.

Developers should choose an appropriate approval method based on user needs and project requirements.

Allowance and Approval

To allow the DZap DCA contract to manage trades on behalf of users, set up token allowances. The default method for allowances is Permit2. If you prefer direct ERC20 approvals, change the default behavior using the setConfig method.

PreviousOverviewNextQuick Start

Last updated 6 months ago