Proposal for Auto Spot Trading Bot

NOTE - This proposal will be submitted for voting in 7 days, which is the 27th of March, 2023. Please leave your comments, suggestions and objections on the official Agora forum post before this date.


– Completely original code written from scratch (not copied from another open-source project)

– Supports CEX, DEX and other swap pools for trades

– Makes 50-300 trades in a day

– Protects assets from sudden price fluctuations by monitoring currencies & selling early

– No code & No configuration required

– Configured for short term trading 24x7 without user intervention

– Does not use the native swap module (does not require access to LUNC’s swap pool)

– Supports swaps (not orders) for trades to make instantaneous trades without significant slippage

– Supports spot trading which is much safer than margin trading

– ROI (according to calculations) is 750-5,000% per year


– Restore/fix LUNC swap pool and core swap module

– Configure bot to use LUNC ecosystem tokens/coins for swap only

– Support USTC as the default gas token

What is an auto spot trading bot?

Spot trading is simple trading in which orders are realized at current prices.

An auto trading bot for spot trading is a software solution to automate the process of trading, relying upon historical data which is processed and analyzed for meaningful KPIs, which help in making a financial decision on spot.

A spot trade can either be a buy or a sell. It can also be a swap between currencies.

Doesn’t Binance and Kucoin have auto spot trading bots?

Yes, but they utilize a process called Grid Trading in which the bot creates a grid of orders at the prices that the user specifies according to certain criteria.

The issue with grid trading is that if prices do not follow a regular pattern (and a smooth curve on the chart), it will not execute the lined-up orders which will remain pending. It would require advanced knowledge of trading and also user intervention to set up and use the bots. Most traders do not utilize such bots for these reasons.

The auto spot trading bot I have written only trades via swaps. It does not utilize orders which may or may not execute. We have completely removed such a scenario by utilizing swap pools, in which we can have instantaneous swaps between crypto coins and stable coins. Currently, it is using the Binance Swap Pool Trading API to get data for swap pairs and making swaps.

For example, the bot swaps USDT/BTC when the price of BTC is increasing, and then BTC/USDT when the price of BTC is decreasing. This ensures that trades are executed at exact prices, preventing loss due to sudden price fluctuations and pending orders.

Does it support Margin Trading?

Currently, it only supports Spot Trading, which is much safer than Margin Trading (which utilizes collaterals and borrowed/loaned money to trade).

Margin Trading uses the principle of Buying Long and Selling Short, which is also integrated into the auto trading bot implicitly, but it is protected from over-collateralized assets since the bot uses Spot Trading only to make trades. It will automatically stop trading if the account balance is converted to fiat or falls below the required minimum balance to make a swap trade (usually $5-10 is the lower limit for a trade).

Does it support Machine Learning and Artificial Intelligence?

No. The architecture of the bot has been designed to be instantaneous, reactive and responsive to the minute. ML & AI takes into consideration significant amounts of historical data which may prevent it from reacting to sudden price fluctuations in the market (as it is generally observed in the cryptocurrency industry). The bot works perfectly without the requirement to implement ML & AI immediately.

How is this bot relevant to Terra Luna Classic?

Currently, the bot fetches cryptocurrency data from CoinGecko (primary) and CoinMarketCap (secondary), compares it to swap pool data from Binance Swap Pool Trading APIs, and makes an instantaneous trade using the same Binance Swap Pool Trading API. This allows us access to 90+ coins to make swap trades using (200+ swap pairs).

All the bot requires, is a swap pool to make trades. So, it can connect to CEX swap pools, DEX swap pools, as well as swap pools of individual cryptocurrencies, like Terra Luna Classic.

Since Terra Luna Classic already has a swap module, the auto trading bot can utilize the swap module to get swap pool pair(s) data and make the final swap trade using the same.

The bot makes 50-300 trades in a single day. Multiple users utilizing the bot will significantly improve current volume rate(s) which will help bring back much required confidence in all the coins part of the Terra Luna Classic ecosystem, apart from making profits comparable to the best positive PNL rates in the market.

How does the bot work?

  1. Polls the CoinGecko/CoinMarketCap API(s) for the list of available cryptocurrencies:

  1. Polls the Binance Swap Pool API(s) for swap pool data like the list of coins supported for swaps:

  1. Polls the CoinGecko API(s) once again for the granular 5-minute block data (prices, market caps and volumes) of the supported swap coins/tokens:

  1. Calculates 5-minute block changes for each supported coin/token:


  1. Using a proprietary Prediction Model, the bot calculates a rank to risk ratio for each coin:

  1. Uses the Binance Swap Pool API(s) to make an instantaneous swap from any one stable coin to a non-stable coin:

  1. Monitors the invested coin for price changes and calculates non-viability of a coin for investment (when the price of the coin is falling). Uses the Binance Swap Pool API(s) again to make an instantaneous swap from the invested non-stable coin to a stable coin:

Calculation of Return on Investment (ROI/APR)

Average Number of Trades in 24 hours - 100

Maximum Number of Trades (Currently Supported) in 24 hours - 288

If we consider the probability of the prediction bring correct is 50%, then 50% of the trades executed will be successful. Thus,

Average Loss % from each trade ** - 0.30%

Net Loss % in 24 hours - (100/2) x 0.30% = 15%

Average Profit % from each trade ** - 0.50%

Net Profit % in 24 hours - (100/2) x 0.50% = 25%

(IF Average Number of Trades in 24 hours - 100)

Net PNL % in 24 hours - 25-15% = 10%

Average PNL % in 1 year (APR) - 10% x 365 = 3,650%

(IF Average Number of Trades in 24 hours - 288)

Net PNL % in 24 hours - 28.8%

Average PNL % in 1 year (APR) - 28.8% x 365 = 10,512%

These are estimates and actual figures may vary between 500-15,000% APR depending upon how well the market is performing and how the individual coins available in the swap pool are doing in the market.

*** Excluding Gas Fees*

Calculation of Fees

Development Fees % - 0.05% (Paid to Developer)

LUNC Burn % - 0.05% (LUNC Burnt)

Net Fees % per transaction - 0.1%

Average Number of Trades in 24 hours - 100

Average Value of each trade - $100

Net Development Fees in USD in 24 hours per user - $100 * 0.05% x 100 = $5

Net LUNC Burns in USD in 24 hours per user - $100 * 0.05% x 100 = $5

If we consider that only 1000 users are using the bot every day,

Volume of trade per day - $100 * 1000 x 100 = $10,000,000 (total for all coins, not just LUNC)

Net LUNC Burns in USD in 24 hours for 1000 users - $5 x 1000

= $5,000 or ~38,461,538 per day @ 0.00013 USD

These are estimates and actual figures may vary, though the figure above is underquoted and fairly close to expected returns/burns. The actual returns/burns may be much higher than this.

What is the current state of development and who are the developers working on it? Is the code open source?


I, Arunaday Basu, am the sole developer on this project currently, but the investment required for this project includes 1-2 developers apart from me (who will be required if this proposal is passed). I am primarily a full-stack JavaScript developer and MERN (MongoDB, Express, React, Node) is the stack that I generally work on. I have almost 13 years of development experience in various languages, stacks and CMS. I have worked for various companies including blockchain/cryptocurrency startups. I am professionally a business owner and I have a Bachelor of Engineering degree in Computer Science and Technology. I am a resident of India, and apart from coding, I am passionate about trading on the cryptocurrency market, mining, history and art. A longer description of myself is provided in the other proposal I have submitted for discussion.

Current State of Development

I have started writing code this month on the 6th. In the last few days, I have almost finished writing most of the APIs including fetching data from different trackers, saving data in a database, calculating investment viability and executing trades.

Since I do not push to Github generally for work (I do have a public profile there), I am providing screenshots below of the repo in my private BitBucket account:

This is a view of the repos I already have in that Bitbucket account. I am pushing code there for 7 years now:

The next few developments planned for the Auto Spot Trading Bot are:

  1. UI using which users will be able to login and access the features

  2. Live crypto prices ticker with predictions that show how the bot works

  3. Improvement of the prediction model

There is, of course, a lot of code to be written including making the prediction model better and accurate to the second, but I require investment for this since I will be working full-time on it until the objectives mentioned above are achieved, including the mentioned future plans.

Proprietary Code

It is not only difficult to maintain this project as an open-source project, it is equally difficult to provide information on it transparently after what has happened with the casino and how the code was probably copied by another entity to create a completely different project.

If that happens with this project, not only is that a danger to the security and safety of the automation system and its users, I will not have a representative, company or even individual to pursue for legal and financial damages.

I will not be able to publish this project as an open-source project and the code will completely be owned by me, Arunaday Basu. I will, however, sign a 5 years maintenance contract with the community, during which time all development including looking after bugs and fixes are my responsibility. I will sign and send this contract to the Terra Grants Foundation physically if this proposal is passed.

Within 5 years, I plan to get investment to maintain the dApp further. If that isn’t possible for any unavoidable circumstance, I will duly transfer the code to another competent authority representing the Terra Luna Classic community (upon passing a proposal appointing the competent authority as a representative of the community).

What is the investment/funding required for the project (from the Terra Luna Classic Community Pool)?

Total Investment Required for Development & 5 years Maintenance - $100,000 USD in LUNC

(Which is approximately ~769,230,769 LUNC @ 0.00013 USD/LUNC)

Total Time Required for Development - 2-3 months for Beta, and 1-2 months more to go Live

(4-5 months in total)

The investment required is high, even compared to my other proposal. This is because I need to devote full-time into work that will require me relinquishing my current responsibilities completely. I will probably need to hire and manage a couple of developers along with myself working full-time on coding. So, this is not work that can be done part-time.

The investment required will be used for the following:

  1. Cloud server on AWS or GCP for 5 years

  2. Paid API plans because the free plans do not support too many transactions

  3. Remuneration for developers including ML & AI developers

  4. My remuneration for 4-5 months

  5. Marketing, funding, and other activities

Declaration: I hereby declare that the details furnished above are true and correct to the best of my knowledge and belief and I undertake to inform the community of any changes therein, immediately. In case any of the above information is found to be false or untrue or misleading or misrepresenting, I am aware that I may be held liable for it.

A PDF version of this proposal is attached for users who wish to read it offline

Proposal for Auto Spot Trading Bot.pdf (1.4 MB)


Is it possible to test the bot on historical data? By analogy with a metatrader? How to check his work without risking funds?

1 Like

Great question. I am currently working on a public interface using which users can log in with their wallet and check how the bot is performing without activating trades.

Users will be able to track the coins and see the profit % without actually investing. This will be the test interface which is planned to be released next (hopefully, before the voting begins).

We can definitely do some tests with historical data and publish those results for everyone to analyze. I will try to do this within the next couple of days.


personally i’d make a grant for the 2-3 months and then see what comes of it.

1 Like

Thanks a lot for your feedback. That could surely work. I would be open to a smaller implementation at lesser cost for a trial.

Cost is a pittance, yet the timeframe is enormous.
5 years is a long time in cryptospace and lump sum upfront has no guarantees in the sense of where the developments take this chain and crypto in general.

And, with current CP largely being split between Q2 L1 and Q2 USTC team, I doubt this proposal would pass on the concern of the upfront cost.

Tiered payments/quarterly?

1 Like

Yes yes definitely. Actually, what I meant was that the product will be ready to go live in 5 months. 2-3 months for a beta test. But it will be “maintained” for 5 years.

There is a reason for this. I’m actually requesting for 100k in one go. So the community does not need to pay anything else after that. I will show this investment to VCs like a seed round.

I would have already got this seed investment from you guys if the proposal passes. After that I will approach a VC and ask him to fund me since I will sell him a “premium” version of this product. This product will always remains the community’s property, which is why I mentioned that if you pass a proposal to transfer ownership to someone else in the community, I will do that without any charge.

So this version (that I have proposed) belongs to the community and forever will. Whoever wants to maintain it after that, can do that. If the community later decides that they want to make it open source, they can do that as well.

P.S. I’m actually surprised why, after getting the money from the CP, the teams haven’t approached VCs yet. That’s the first thing I would have personally done if I were them. I mean, what more do I need than an actually investment from a community of a billion dollar coin, to show to an investor? The investor will not only fund me, he’s gonna fund the chain as well if everything goes right, and if I am truly honest about my work.

You offer to buy a black box from you. No robot that has traded profitably in the past guarantees profitability in the future. And you don’t even have confirmation of profitability in history.

1 Like

That is an extremely good point and I was expecting someone to ask this sooner or later.

This bot emulates human behaviour more closely than robot behaviour, while all other bots currently available in the market emulate a set robot-like behaviour in which they execute orders based on price that you supply to them. That won’t happen on this one. In fact, it will execute orders only when it sees that prices are rising. It will sell off or not trade when prices are falling, protecting the investment, and making more money when prices are increasing, cause it will hold till the moment it sees that prices are falling again.

The theory behind the functioning of my bot is quite simple - it tracks the coin you choose, and decides to buy or sell it depending upon whether the prices are increasing or decreasing. That’s pretty much it.

I will make it run on actual data in the preview. You will be able to see how much profits the bot is making. I will probably shift voting for this till the time that people have checked how it is working. This will NOT go on vote on the 27th and I will edit this post today appropriately.

Eh, if trading were as simple as what logic you program to your robot, the world would definitely be different.
Will the loss limit system be present in the logic of your bot?


Not bad idea, when @Vegas returns multi-sig to CP, it won’t be a big waste. But all focus to repeg, without - 100% end.

1 Like

Yes sure. This works more or less like margin trading without collateral. So there is a concept of stop loss limits which are automatically configured according to the risk level that you choose to invest in.

Say, you choose your risk level to be low. At that time, the bot will automatically configure a stop loss at about 0.30-0.50% so that it sells when the price falls to 0.30-0.50% of invested price. If your chosen risk level is high, it will configure a stop loss at about 1-2% of the invested price so that you can make maximum profits without much loss.

Hello. thanks for your work and dedication. It sounds fantastic, what a vision.
But what is the worst case scenario here? How much of what are we risking? Maybe you can put that into laymens terms for all to grasp. Trading profits are great on a sunny day - but what about when the proverbial sh#t hits the fan? What is the maximum exposure to this community at any given time? Can you elaborate on the stop loss provisions? What pool of money does the trading bot have access to? Is there any circumstances where leverage can occur?

The other question is regarding payment to you and your co-workers. Unfortunately as community we have a history of pay for work up front which is then not implemented and or the group disappears. The majority of the $100,000 if I get that right is reserved for remuneration of your team and after implementation you see a percentage return on the trades.

I suggest to give your proposal an authority boost to receive the $100,000 on succesful project completion. They can be approved now in this proposal so you know you are going to get paid - but payable only on conditions x y z like - bot is actually trading successfully.

I am sorry if that sounds harsh and is an imposition but it would increase the credibility and chances of your project to be adopted. As a community we are at the end of the road. We may have only one more of these type of shots.


The question that arises for me is why you want to earn additional income from every trade, in addition to the 100k$ for your work, if the ownership of the bot belongs to the community. In this case, the earnings should also remain 100% with the community and not result in a lifelong payout to you for every trade.
Then you have to decide between the 100k or the participation in the trades.
Both, however, are ultimately too much.


I will say yes to this proposal with a veto. :slight_smile:

1 Like

Thank you so much. Really appreciate it :raised_hands:t2:

You are absolutely correct and since I am a community member also, the Community Pool is my own money as much as it is your money. I was here when TR happened and when this L1 team happened. I saw the YouTube influencers leaving the last few days as well. I know of TR buying vacuum cleaners with the money given to them. A lot of the money which has gone out of the Community Pool doesn’t have any account. We do not know where that money is now.

I am not here to leave. I know that, after all that has happened, it’s difficult for anyone to trust another proposal, and I am on the same boat as you guys. I am as doubtful as everyone else with the latest proposals. I will also say this that I am not a L1 developer, and I am just a L2 developer. So mistakes do happen, and timelines do get extended. But I am absolutely sure about what I am saying, otherwise I wouldn’t even put this up. You can be rest assured about that. I have long term plans with Terra Luna Classic, but if people get restless and don’t wait for us to do our work, then we will never get to $1.

I am completely fine with making a live working version of this, if it was possible. The investment required for it is actually too large to afford it currently without some external funding. Which is what I was trying to say. 100k isn’t enough for this. I will just show this 100k to possible investors who will give me at least 1 million more. Otherwise, maintaing it for 5 years is impossible. The developer fees which have been included in the calculations is a backup for this - if by chance I can’t secure this 1 million dollar funding in the next 1 year. I will need this money to pay for the servers and premium APIs. Otherwise the bot will not work for more than 1 user - it consumes so much computer resources and calls so many APIs in one go. It looks simple, because I have over-simplified the explanation for non-technical users here, but just the prediction function is approximately 500 lines of code.

What I am about to propose is a basic funding amount of $10,000-20,000 so I can at least take the server and APIs for the next 1 year. That’s how much it costs approximately. So I will only take that money from the community. If I pass a text proposal like Duncan, the issue is that I will not be able to afford the API required to make this bot work. In dollars, it’s a lot of money for me. I am in India and I need to take the server from AWS and the APIs from CoinMarketCap and CoinGecko. They are not very cost effective, to say the least.


This is what I had in mind if the trading bot is 100% community owned. Earnings should go to burns and refill of rewards and community pools.

1 Like

Yes, I saw what you have written in your post.

I will definitely consider your idea and modify this proposal further to suit the needs of the community.

There are a few changes that I need to make to this, including the developer fees.

The others are correct that I should not be taking developer fees after I have received funding from the community. So I will remove that.

That portion can be added to burns instead of paying to the developer.

I am hoping that with 10-20k I can get and keep an AWS/GCP server running for the next 1 year at least without any issues. That should also suffice for my development charges as well.

Within 1 year, we should have figured out another source of funding to keep it running beyond 1 year. I am sure some company will be able to sponsor a non-profit for such a great tool. AWS and GCP anyway give free servers to non-profit projects so that should not be an issue.

I am looking forward to continuing development on the bot after I am done adding some changes to Station and Rebel Station.

A trading bot must be developed and paid for entirely by the developer!

  1. This bot is almost guaranteed to be unprofitable.
  2. If the bot is profitable, then the developer of this bot is also almost guaranteed to use this bot for personal enrichment.
    This proposal can be considered fraudulent and it is necessary to vote on it - NO WITH VETO.