Voodle is a trading platform where users can create strategies to automatically buy and sell tokens on the TON blockchain, without the need for technical knowledge.
This is my first time open-sourcing a project, so I appreciate your patience as I work through any issues. Since I didn’t originally plan to open-source this, the code could be better documented and cleaned up. Improvements are on the way!
The frontend and backend are separated into two repositories:
Voodle is still under active development and is not fully functional yet. Please use it at your own risk.
- The trading engine is operational but needs further work to handle edge cases, especially around concurrency, error handling, and low balance scenarios.
- Platform fees are correctly applied on buys, but sometimes not applied on sells (this is a known issue and will be fixed). These fees are separate from blockchain transaction costs and are how the platform generates revenue.
- No tests yet!
There's a lot of room for optimization, particularly in the way strategies are matched against tokens. Currently, each strategy is checked against every existing token on the blockchain, which is inefficient and time-consuming. Planned optimizations include:
- Checking only tokens that have changed since the last trading engine cycle.
- Implementing a Priority Queue System.
- Introducing Batch Processing.
- Utilizing Caching and Memoization.
- Improving Database performance.
- Transitioning to an Event-Driven Update system.
The frontend design needs to be improved.
- User authentication with magic link
- Real-time trading engine
- Strategy management
- Token and pool tracking
- Transaction history
- Wallet integration
- Multi-DEX support (DeDust and StonFi)
- Backend: NestJS with GraphQL
- Database: PostgreSQL with Drizzle ORM
- Authentication: JWT
- Blockchain Integration: TON SDK
- API Integrations: TON API, DeDust API, StonFi API
- Node.js (v18.17.1 or later)
- pnpm
- PostgreSQL
-
Clone the repository:
git clone https://github.com/jcoulaud/voodle-server.git cd voodle-server
-
Install dependencies:
pnpm install
-
Set up environment variables:
- Copy
.env.example
to.env
and fill in the required values. - Generate the secret keys with
openssl rand 60 | openssl base64 -A
- Copy
-
Run database migrations:
pnpm run db:migrate
-
Start the development server:
pnpm run start:dev
-
Start the pool manager (updates token pool information in the database):
pnpm run start:pool
-
Start the trading engine (checking for new strategies to execute):
pnpm run start:trading
-
Start the frontend:
To run the frontend application, please refer to the Voodle Frontend Repository for installation and setup instructions.
src/
: Source codedb/
: Database related files (migrations, schema)graphql/
: GraphQL resolvers and type definitionsservices/
: Business logic and serviceshelpers/
: Utility functionstypes/
: TypeScript type definitionsemails/
: Email templates
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the AGPLv3 license - see the LICENSE file for details.