Crypto Trading Bot Platform: Web App, Risk Controls and Node Scaling
A refactor of a Node.js trading bot and a web platform around it, with subscriptions, an admin panel and controls for many users
NDA Covered
About the project
- Project: A subscription platform around a crypto trading bot
- Industry: Crypto trading, blockchain
- Timeline: November 2023 – May 2024
- Technologies: Node.js, Next.js, PostgreSQL, Docker, Ethereum
- Team: a full-stack blockchain developer and a project manager
The client already had a crypto trading bot written in Node.js. It traded on a decentralized exchange for the client's own account, but it had no users, no backend for them and no web interface. The client wanted to sell it to a community as a subscription, and to do it fast.
So the task had three parts: make the old code safe to build on, put a web platform around it, and add the controls that a trading tool needs when many people use it at once. We worked on it from November 2023 to May 2024.
What we delivered
THE CHALLENGE
- A bot with no users and no backend.
- Code that did not start as handed over.
- Many people trading at the same moment.
- A fast launch.
THE SOLUTION
- A refactored bot as the base.
- A Next.js platform with 2FA and an admin panel.
- Controls for draw-down and trailing stop.
- A queue and node rotation for load.
THE OUTCOME
- A web platform with subscriptions.
- Admin tools and a kill switch.
- A launch in January 2024.
- About 200 users handled.
A trading tool is only as good as its limits: queues, stop rules and a switch that the owners can reach at any moment.
Stage one: a review and a refactor
We started with a review of the code that the client handed over. The bot had five API endpoints, no handling of users, a Firebase database and all files in the root folder. It could not be started from the archive alone, because it needed keys and funds.
We agreed on a refactor before any new features. We rebuilt the structure, cleaned the code, checked the connection to the Ethereum node and set up the DevOps basics. The result went to the client's GitHub repository and became the base of the platform.
Stage two: the web platform
For the web part we offered two options in an estimate, Next.js and WordPress, and the client chose Next.js. The platform runs on Next.js with PostgreSQL, and a Docker Compose setup describes three services: the web app, the database and the bot. Nginx and Cloudflare stand in front of it, and a Google Cloud virtual machine hosts it, with a separate server for staging.
We built the pages from the client's Figma design: a landing page and a dashboard for the subscriber. A user logs in with two-factor authentication, edits the profile, joins a referral program and connects a wallet. On the dashboard, the user sets the amount per trade, starts and stops the bot, and sees active trades and history with CSV export. A sockets layer keeps the screen in sync with the bot, and an admin panel lists contracts and shows all trades to the owners.
Work ran in weekly sprints on a Notion board, with a call with the client each week and a staging build to check before every release.
Stage three: controls for the trade engine
A bot that trades for many users needs rules that protect them, so we added them step by step. The user sets slippage, take profit, stop loss and a trailing stop loss, and a draw-down control stops a user's trading when the loss reaches the limit. The owners got a kill switch in the admin panel.
Tokens arrive from a feed, and many users want the same one at the same moment. For this reason we added a queue of contracts with an internal priority for users. We also studied private transaction routing to avoid failed or front-run transactions.
Launch and scaling
The platform went to production on 16 January 2024 and opened to the community at the end of that month. The client planned about twenty users in the first days, but about two hundred joined, and the hosted node stalled under roughly five hundred parallel connections.
We answered with a rotation of nodes and a request queue, deployed within days. Later, a test with twenty users showed twenty of them entering trades. We also analysed failed and successful trades, and found that the slippage setting explained most failures, so we decided to educate users instead of forcing defaults.
Referrals and what came next
In the spring of 2024 we connected the platform to the client's referral software through its REST API, built a leaderboard and a screen with commissions, and added bundles of trades. A version for Solana appeared on staging in April. The platform kept running in production through the spring.
What turned out to be hard
- A code base to rescue. The handed-over bot did not start as delivered, so the refactor came first.
- A trading scheme that was not written down. We clarified the rules of the bot with the client's trading owner step by step.
- Load on day one. Ten times more users than planned overloaded the hosted node, so we added node rotation and a queue.
- Changing external APIs. The market data provider changed its subscriptions in the middle of the work, and we rewrote the integration and rechecked the profit and stop-loss logic.
- Cloud access. Permissions on the client's cloud account delayed the first deployment, so we tested on a staging server of our own.
Result of the project
The client launched the platform for a community of about two hundred users in January 2024, and it ran in production in the spring of 2024. We delivered the refactored bot, the web platform, the admin tools and the risk controls.
Looking for a platform around a bot or a trading tool? See our blockchain development services or read how we built data collectors for a DApp ranking site. The platform uses Next.js and PostgreSQL.
Need a web platform around a bot or a trading tool? Tell us about your task.
SEE MORE OUR CASE STUDIES
Contact us
Please fill out the form, and we will get back to you once your request has been processed.
You can also send your request directly to our email: info@24gen.space
We will respond as soon as possible after receiving your message.



