Skip to content

Automation investment dApp with conditional dollar cost averaging style

License

Notifications You must be signed in to change notification settings

Maius-Protocol/maius-invest

Repository files navigation

Maius Invest

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

Acknowledgement

Architecture Overview

Explain

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

Local development

Prerequisites

Programs and Local Validator

  • 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 and openbook_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.

Backend

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

Test Client

  • Navigate to the client directory
  • Run cargo run

Run the app

  • Navigate to the app directory
  • Run yarn && yarn dev

License

Maius Invest is open source and available under the Apache License, Version 2.0. See the LICENSE file for more info.

About

Automation investment dApp with conditional dollar cost averaging style

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages