With this project you can create an executable DCA financial strategy in IC (Internet Computer) ecosystem.
- Create and manage automated token purchase strategies.
- 100% on-chain frontend.
- 100% on-chain automation without third-party services.
- Accessible via web applications.
- Accessible via the DFX SDK.
- 0% fees.
- Token for sell - ICP
- Token to buy - ckBTC
- Some ICP coin on your Principal-id
Canister type | Canister id | Stage | URL |
---|---|---|---|
DCA backend | up2ak-nqaaa-aaaap-qccia-cai | Open beta | Candid UI |
DCA frontend | qnoqa-vaaaa-aaaap-qhima-cai | Open beta | DCA frontend |
This call make future transfer from your wallet possible without any additional actions
dfx canister call ryjl3-tyaaa-aaaaa-aaaba-cai icrc2_approve '(record { amount = 40_000; spender = record{owner = principal "up2ak-nqaaa-aaaap-qccia-cai";} })' --ic
CLI result
(variant { Ok = 12_141_598 : nat })
beneficiary change this valuse to your principal id who will receive swap result
tokenToSell ryjl3-tyaaa-aaaaa-aaaba-cai - its ICP Canister ID
tokenToBuy mxzaz-hqaaa-aaaar-qaada-cai - its ckBTC Canister ID
frequency - one of (Daily, Weekly, Monthly)
CLI command to create DCA strategy:
dfx canister call up2ak-nqaaa-aaaap-qccia-cai openPosition '(record { tokenToSell = principal "ryjl3-tyaaa-aaaaa-aaaba-cai"; tokenToBuy = principal "mxzaz-hqaaa-aaaar-qaada-cai"; beneficiary = principal "hfugy-ahqdz-5sbki-vky4l-xceci-3se5z-2cb7k-jxjuq-qidax-gd53f-nqe"; amountToSell = 30_000; frequency = variant {Daily} })' --ic
CLI result
(variant { ok = 0 : nat })
Right after creation, your position will be executed for the first time (usually it takes around 3 minutes). The date of the second purchase depends on the frequency field from the Position
bash scripts/deploy_local.sh
1. dfx deploy dca_backend
dfx canister call ryjl3-tyaaa-aaaaa-aaaba-cai icrc2_approve '(record { amount = 40_000; spender = record{owner = principal "up2ak-nqaaa-aaaap-qccia-cai";} })'
Change the hfugy-ahqdz-5sbki-vky4l-xceci-3se5z-2cb7k-jxjuq-qidax-gd53f-nqe to your principal id who will receive swap result
dfx canister call dca_backend openPosition '(record { tokenToSell = principal "ryjl3-tyaaa-aaaaa-aaaba-cai"; tokenToBuy = principal "mxzaz-hqaaa-aaaar-qaada-cai"; beneficiary = principal "hfugy-ahqdz-5sbki-vky4l-xceci-3se5z-2cb7k-jxjuq-qidax-gd53f-nqe"; amountToSell = 30_000; frequency = variant {Daily} })'
Our achievements and future goals.
- DCA canister can serve to create/edit user Positions
- ICPSwap swap pool integrated
- Onchain automation for purchases
- Frontend canister integrated
- Internet Identity integrated
- Plug wallet integrated
- ckUSDT, ckUSDC, ckETH, CHAT integrated
- Aggregator router integrated
This project is licensed under the MIT license, see LICENSE.md for details.
This project is in the beta testing phase. We are actively working on adding new features and improving existing ones. Please be cautious as the software may contain bugs, and its stability is not guaranteed.
By using this project, you agree to do so at your own risk. The authors of the project are not responsible for any potential consequences of using this software.