Maius Invest is an automation investment dApp with conditional dollar cost averaging style.
Program | Devnet | Mainnet Beta |
---|---|---|
Maius Invest | EZgeH8NyKikE796CWWnYQfYJ839piWatDjJzXLJS1FvR |
coming soon |
Openbook Crank | 2BCWsXMC2KPB612DssxTdG4jUH5Z32GAdywUPRsGDtzA |
coming soon |
-
This project was built during the Solana Sandstorm hackathon and is strongly inspired by Clockwork and Dcaf Drip projects.
-
Maius Invest is in active development and the code is unaudited. Please use at your own risk.
-
User sets the necessary parameters for the DCA (deposit_amount, schedule, pause_event,...) and deposits token into the investment vault.
-
Each user will have their own investment vault, and each investment vault will have an investment thread managed by the Clockwork Thread program.
-
The investment thread contains a swap instruction to place orders on the Openbook Dex according to an established schedule.
-
A dedicated backend integrated with the Helius webhook is used to pause the investment thread if a pause_event occurs on the Solana network.
-
At the same time, the Openbook Crank program is run to ensure order matching for the investment vault.
- Install solana cli and anchor cli
- Install yarn
- Install nodejs
- Install clockwork engine locally if you want to test on localnet
- Run
anchor build
- Run
anchor keys list
to get the program's IDs - Copy those IDs and replace them into the files
maius_invest/src/id.rs
andopenbook_crank/src/id.rs
respectively. - Run
./run.sh
to start a local validator with Clockwork Engine, Maius Invest program, Openbook program and Openbook Crank program.
- Navigate to the
backend
directory - Run
yarn && yarn dev
NOTE: You need to deploy this backend to the server or use a serverless service to be able to work with Helius webhook.
- Navigate to the
client
directory - Run
cargo run
- Navigate to the
app
directory - Run
yarn && yarn dev
Maius Invest is open source and available under the Apache License, Version 2.0. See the LICENSE file for more info.