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”.

What it does

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.

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”.

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 ran into

1.) For creating oracle, we had to manually map tokens to Chainlink feed. Because the feed registry contract is not available for Polygon network. 2.) We opted to use keeper, but it didn’t fulfil our requirements. 3.) 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.

Accomplishments that we're proud of

1.) Building a complete project in 1 month from start to end, and smart contracts to front-end. 2.) The project is almost ready for production.

What we learned

1.) Implementing Chainlink oracle and APIs. 2.) Learned end-to-end development process. 3.) Learned how does chainlink, filecoin and quicknode works. 4.) Learned how to work as a team to build, delegate, and troubleshoot the necessary project components.

What's next for DZap DCA

1.) Integrate TWAP(time weighted average price) feature to give the best price to users. 2.) To build a feature for users to to generate yield on their DCA position. 3.) Get contracts audited. 4.) Improve UI/UX of the website. 5.) Add more chain support. 6.) Improve the contracts and add additional functions to optimize gas usage. 7.) Focus on community engagement.

For more details we have written an article:

Built With

+ 5 more
Share this project:

Updates