web analytics
July 15, 2024

I haven’t undertaken a large coding project in a while. Decided to do some random coding for fun and then it hit me. Why not create an MLM or Pyramid Scheme script where people can Invest into and create an account and share their unique referral code and receive commission for that referral down to multiple levels? I don’t have that much experience in developing with blockchain, but this is where Coinbase came in handy. I can do all the blockchain coding using Coinbase API.

The platform idea was simple. I would obviously make multiple disclaimers saying that all the wallets are held at Coinbase, and I wasn’t offering any services. Just a simple opportunity to create a unique economy, from which everyone was benefiting from. So off I went…

Building the Dev Environment for “Project Lynx“:

This type of project requires a barebones dedicated server. Fortunately, enough for me, I have a few. So, I wiped one of my less used servers, which was actually pretty powerful. Decided to keep it simple and install Ubuntu Bare-Bones Server. Anything that I would ever need can be installed manually without any of the junk. Such as Apache, PHP, MySQL, and most importantly Coinbase SDK.

Linking Coinbase with the Script:

In order for me to get Coinbase to work with the script, I had to create a Developer as well as Business accounts. Once my identity was confirmed, I created the API keys to be able to link the script to Coinbase:

SQL Database Creation:

The next step was to create a SQL Database with User Detail / Management, Wallet Details, Transaction details, etc. I will not provide code example for the SQL Schema due to security issues but it’s getting quite big.

The Code itself:

The code itself is pretty straight forward and dependent on REST API’s and WebSocket API’s to authenticate between the script and Coinbase.

Features of the Crypto Investment Platform:

MLM / Pyramid Scheme: Initial script was just going to have an MLM Style referral system. However, after digging through Coinbase API and Developer Documentation, I was mesmerized over the power that Coinbase held. I started creating various other functionalities into the script:

  • Crypto Auto-Trading Bot:

    The Auto-Trading Bot is run on Python. With Python I took full advantage of using numpy and and pandas libraries as well as cbpro (Coinbase Pro). A simple trading strategy based on SMA crossover. If the 50-period SMA is above the 200-period SMA, it signals a buy. If the 50-period SMA is below the 200-period SMA, it signals a sell. There are various other popular logics I have implemented but this was just a jist of it. The user will have the ability to transfer all commissions to the trading bot.
  • Lending Platform:

    Users can lend Crypto to other users and get commission based on % that they set. The functionality for that was relatively simple, but for security purposes, I need to figure out how to validate users, so people don’t get scammed. I would need to think of a way to create contracts, etc. For the most part, I will probably limit people to give and receive loans in US and more specifically, bot givers and receivers of the loans would have to reside in the same state in order to be able to sue each other in the event there is a default on the loan.

More to come!

Leave a Reply