DZap x Chainlink Hackathon

The Chainlink Hackathon has proved to give an ultimate boost to development in the Blockchain industry. For a matter of fact, the Spring 2021 Chainlink Hackathon saw such a record-breaking turnout that gave birth to projects like deBridge, Vulcan Exchange, Fract.io, and many others. This has inspired many developers to build no matter what the market condition looks like. And, Team DZap is one of them. Hence, we participated in the ongoing “Chainlink Fall 2022 Hackathon” to build a feature-rich project on DeFi.

Team DZap built “A Permisionless Dollar-Cost Averaging(DCA) platform”. A deep dive-in below/

Dollar Cost Averaging⚡️

Crypto markets are made up of two types of investors - traders and HODLers. A trader takes a defined level of risks and often stops the trade at their defined stop-loss range, while a HODLer buys every dip and HODL or buy tokens at a defined interval. And to tackle the volatility of crypto market, investors always look for viable investment strategy. Dollar Cost Averaging(DCA) is one of them.

DCA simply means scaling into a position. DCA is a strategy where one invest small amounts at regular intervals irrespective of the market condition (bull or bear). The logic behind this is simple. By not buying lump sum right away, you are protecting yourself from a potential downside and securing yourself a better average price per trade.

Inspiration

Most of us joined the crypto space and traded tokens in the hope that we can make a quick buck. But often we become a victim to emotional trading and find it difficult to buy/sell cryptocurrencies at a fair price. It’s difficult to time the market. That's where DCA comes in. And no denying the fact that Centralised Exchanges offers this feature but again they are CENTRALISED. Self-custody is important in the crypto ecosystem because “Not your keys', not your coins”.

Team DZap realised this lack of a decentralised DCA protocol that has the potential to capture the investment market. Hence, we built a decentralised, permisionless DCA platform so that users can have self-custody while investing in cryptocurrency. We are building this project to build the gap between “trading and investment”, “centralised & decentralised”.

How to use

DCA UI
DCA UI
  1. Select a token from your wallet you wish to sell.

  2. Select a token you wish to accumulate.

  3. Enter the total amount you want to deposit. Example: $100.

  4. Frequency of the DCA. Example: Daily.

  5. Select the time who want to run DCA in the chosen frequency. Example: Daily for 5 days.

  6. Create Position and confirm the transaction in your wallet and that’s it.

This example narrates to “Buy $10 worth of a USDT everyday for 5 days”.

  • You can also check all your DCA positions through the dashboard.
Position Dashboard
Position Dashboard
  • We also provide an option to withdraw, modify or terminate positions.
Modify
Modify

How we built it

Chain-compatibility: The DZap DCA is built to support all EVM compatible chains and is currently deployed on Polygon Mainnet.

Languages used: The smart contracts are coded using Solidity language. For backend development, we are using node and GraphQL. And, frontend is developed using React.

Chainlink: We are using Chainlink API calls to the Chainlink Price Feeds to determine an optimal price of the token and the consecutive swap. First, we fetch prices using an aggregator and then re-verifies the prices using Chainlink on-chain oracle live data. By using Chainlink’s decentralized oracles, we ensure that best rates are being provided to the users.

FIlecoin: We used Filecoin for the frontend storage and hosting purpose.

Quicknode: As the RPC provider.

Challenges we faced

  • For creating oracle, we had to manually map tokens to Chainlink feed. Because the feed registry contract is not available for Polygon network.

  • We opted to use keeper, but it didn’t fulfil our requirements.

  • Our aim was to build a project that could be continued on after the hackathon, hence building the architecture that would be maintainable for years to come was challenging.

What’s next for DZap DCA

  • Integrate TWAP(time weighted average price) feature to give the best price to users.

  • To build a feature for users to to generate yield on their DCA position.

  • Get contracts audited.

  • Improve UI/UX of the website.

  • Add more chain support.

  • Improve the contracts and add additional functions to optimize gas usage.

  • Focus on community engagement.

Know more about DZap

Website | Twitter

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.