AutoFarm on Raydium Platform

What is Raydium?

Raydium is an automated market maker (AMM) built on the Solana blockchain. They provide liquidity to the order book of the Serum decentralized exchanges (DEX). Apart from that this innovative feature It is very similar to Pancake Swap on the Binance Smart Chain or Uniswap on Ethereum. They provide swap like in above platform, yield for liquidity provider, tax fees reward for RAY stakers.

Technical Requirement



Now we will see how to become a Liquidity Provider on Raydium Platform. I suggest you to pass by FTX Platform as they have direct transaction to Solana Blockchain without any fees. It’s way better than make the change on Ethereum blockchain where fees are very expensive right now.

From FTX you can buy Sol that we need for fees transaction and other asset that we will put in Liquidity Pool.

Also you need to add Sollet wallet extension to your browser.  Afterward add tokens, so in our case RAY , USDT, SOL. Transfer your asset from FTX to your Sollet wallet.

To do so, don’t hesitate to follow sollet tutorial on it.

When you have transfer some Sol into your wallet to validate transaction and the assets to provide in Liquidity pool let’s see how to become a farmer on !

Liquidity Provider

Now that you have your asset in Sollet browser extension and are on raydium let’s provide liquidity.

On this platform you can trade like in a decentralized Binance on or swap token instantly on

Let’s jump into farming by providing asset in


You can add tokens and add the equivalent amount to get Liquidity Provider Token. This Token proves that you are a Liquidity provider.

This LP Token allows you to earn fees from Transaction on these pairs. In this example, you will have a certain amount of all fees of SOL/RAY Exchange.

Indeed, when you make a trade or swap on Raydium there is 0.25% fee transaction.

0.22% is redeposited into the liquidity pool and acts as a reward for liquidity providers.

0.03% is sent to the staking pool and acts as a reward for those staking their RAY tokens.

You can have a look of volume of exchange and Fees/Liquidity ratio on


Now Let’s put our LP Token in to lend our LP Token into Farming Pool to have Raydium Rewards at high rates!

Once it is staked, you will have RAY Reward coming at each transaction block. For your information APR is live and can go up or down according to the liquidity and the volume.

Moreover, you can also Stake your RAY into This staking pool can offers you the access to some Initial DEX Offering (IDO). An IDO is a token offering to start and promote a crypto-project in this case on the Solana Blockchain. You can have a look at the condition on this AcceleRaytor following this link

Autofarm RAY Token

In conclusion, on the more technical side, I’ve made a Python Script that you can let run on your device this automatically stake your LP Reward or Staking Reward into more staking. Like this you will have compound interest!

You can find the instruction and the script on my GitHub:

Now you have optimized all your Farming Processus and autofarm on Raydium Platform. You are one of the actors of Solana ecosystem and it rewards you for it.

This is not a financial advise and be aware of their always is risk when investing.

Moreover be aware of Impermanent Loss when providing Liquidity:

If you want to go further:

To know more about this Raydium project :

Raydium French Youtube Tutorial:

In relation here is my Lending/borrowing OASIS platform review :

Don’t miss out my review of CeFi, DeFi :

AutoFarm on Raydium Platform made by Guillaume Niay

Binance Trading Bot in Python

In this article we will see how to build a trading bot linked to a cryptomarket. In this example we will make a Binance Trading Bot in Python. It can be reuse your own way on other exchange, for stocks as your convenience. Reminder that it’s not a financial advisement and investing is at your own risks.

Now let’s get into the detail and see what we require to create our little robot.






Binance API

First you need to have a Binance account, if you don’t create one by clicking here.

Afterward click on your profile and go in API Management. Create your API key and save your public API key and secret API key somewhere safe. If you want more detail on this operation Binance has made a tutorial here.

Verify that trading is enabled and deposit money in the asset you want to trade otherwise it will be difficult for our robot to trade! 

Don’t forget to put some security in your account like 2 FA, login with SMS code etc…


If you don’t have python please install it. Don’t forget to add the python.exe path into your path environment variable if it wasn’t automatically do.

When it’s installed, we need to setup libraries we will use for our script. Please open your cmd and install:

pip3 install python-binance 
pip3 install ta

The first library will allow us to do action in Binance and the second will provide financial technical analysis tool to help our robot make decision.



Python Script Details



Access Binance Account

Now that we have everything set we can start coding!

Let’s retrieve our account data by accessing Binance website. Include your own public API KEY and Secret API KEY.

We will look for our wallet quantity amount on interested pair. In this example it will be USDT/ETH. 

Financial Analysis

I’m not a Financial expert but I have some basic knowledges. If you would like to add information on the financial part, fell free to share in the comment section.

In my example I have used the basic yet strong Moving Average Convergence Divergence (MACD) and Related Strength Index (RSI) on 4 Hours time periods.

We will use MACD to check if we are in a Bullish or Bearish market and according to the case we will adjust our action.

RSI is a great indicator to see if on a certain time period the asset is oversold or overbought.

My following Bot action has been setup after analyzing pattern on March period on this asset. Moreover, I have set a stop loss to prevent having massive losses.


Bot Actions



After my analysis on last month market and my knowledge on indicators I went up with following action for our trading bot.

I used MACD Trend, RSI variation to forecast Buy/Sell action. In that case I also cancel or put Stop loss according to the action we are doing (Stop Loss if Buying and cancel them if Selling). Feel Free to adjust your quantity, add your own indicators. Above is just an example from my perspective but you can adjust it to yours. 

You can have a look at the full code here on my Github.



Script Scheduling





Now that our script is ready to be use we don’t want to have to run it manually every 4 Hours. So let’s schedule it.

To begin, we need to create a bat file to enable the launching of the script by the scheduler.

To do so open your cmd and type:

where python

Press enter and copy the resulting folder. Now open a bloc-note and insert:

"pathopython.exe" "C:\"

Save this bloc-note as a .bat file.

Now Open task scheduler in windows as administrator.

  • In action select the .bat file you created.
  • In Trigger set start one time and set repeat the task every 4 Hours for an indeterminate period of time.
  • For the rest set option at your convenience according to your system (all rights on, launching even in sleep mode etc…).

Check your Binance account to look at what did your bot. Look at your orders historic and keep recording your trades!

Linux Debian

I did it on my side on Raspbian to let my Raspberry Pi run script automatically. I think a raspberry is the perfect tool for such daily script execution. 

To do so install all packages with pip3 in your cmd if not already done.

Afterward transfer your python file into your raspberry.

Launch your cmd and write:

crontab -e

Go at the end of the script and erase “#” and mark:

0 */4 * * Pythonpath >> path/log.txt

Now your program will launch your python file automatically every four hours.

If you want to have a look at the log you will have a log file on your desktop.





Let’s Trade




I hope it can help few people to start understanding Finance, Coding and IT in general. On my side the system is set on a Raspberry Pi. Don’t hesitate to write about possible improvement or your feedback in the commentary section.

I will be waiting for long-term results and see if this is a good bot strategy or not!

Bibliography  :

Binance Trading Bot in Python Made by Guillaume Niay

Crypto Treemap


Today we will see how to do our own portfolio with CoinMarketCap   data and visualize it with Power BI.

To do so please create an account in  and get your own API Keys.

Install PowerBI Desktop in Google store or download it here 

CoinMarketCap API KEY
                          CoinMarketCap API KEY

Get CoinMarketCap API

Launch Power BI application –> Import Data from Web.



When you validate you will arrive in the Power Query Editor. First Remove all applied step except Source.



Click On record:

Click on “In table”:

Develop Value and select column in which you are interested in. Develop Value.quote (last column) aswell.

Congratulation you have imported CoinmarketCap Data into Power BI!

Data Visualisation

TreeMap Like Coin360

Choose TreeMap Design

Add some color so you can see quickly if last 24 hours were good for CryptoMarket.

Input your colors as following:

Here is the result!

Oasis DeFi Platform 

What is Oasis?

Oasis is a platform for decentralized finance launched in November 2019 by MakerDAO.

You can use it to exchange token,borrow DAI (stablecoin soft-pegged to the US Dollar) and earn savings.


Secure protocol built on Ethereum

Oasis is built on top of audited and formally verified smart contracts created by Maker, the industry leader in secure decentralized finance.

Completely permissionless

You—and only you—control your assets. Oasis is a decentralized, non-custodial platform, accessible using an Ethereum-supported wallet.

“Decentralized Finance (DeFi) is the movement that leverages decentralized networks to transform old financial products into trustless and transparent protocols that run without intermediaries.”

My curiosity on crypto and blockchain environment has brought me to this point. Thanks to Hasheur and CryptoMatrix I’ve learn a lot about DeFi. I now understand better why this can be an huge revolution in finance sector.



Why I decided to use it?

ETH 2.0

Personally I was very happy with my app account with good staking benefit (up to 16%). Yet, I wanted to stack Ethereum to prepare myself to become a main validator with 32 ETH for Ethereum 2.0 and earn validations rewards.

Meanwhile I was accumulating ETH I was a bit disappointed with the staking reward I was getting (only 3% earning per year) which is still incredible compared to traditional saving account but far from other staking rewards (CRO 16% per year).


Afterward, I heard a lot about DeFi and I started to do some research about it. I found out it could resolve my problem by optimizing my earning.

I can still play the long term HOLD and getting profit from it. I looked on several solutions and I’ve chosen the one from the best organization in this area: MakerDAO. So I followed up and went on the platform linked to the organization: Oasis.




  • Buy Ethereum
  • Get Metamask
  • Transfer fund to Metamask
  • Borrow DAI
  • Reinvest your DAI
  • Pay your Debt



OASIS Tutorial


Buy Ethereum

First you need to buy Ethereum. I suggest you to buy on app which is a great application to enter the crypto world easily. You can buy crypto by your credit card or bank transfer (no transaction fee at this date) and you can download the app on this link. You will see how great is this app is with the review I’ve made on this article.

Get Metamask

Second Step will be to have a web wallet. The easiest way is to have Metamask a google chrome extension or directly on your Brave crypto wallet. Brave is an amazing web browser and you can find why on the article I’ve made here. You can download Brave on this link if you want to support the website. So now we need to transfer our fund to Metamask. Normally you can copy your crypto address on Metamask.





Transfer your fund to Metamask



Now you can go on your app: Crypto wallet -> ETH -> Transfer -> Withdraw.

Withdraw your ETH to your metamask address you’ve copy. Once done your should have your ETH on your Metamask!

OASIS Borrow

Go on OASIS Borrow to start and connect your Metamask. Now let’s start borrowing!


As you can see their is currently NO FEE on borrowing with ETH and BAT.  

So what are we doing right now? We are borrowing DAI (USD stablecoin) at 0% Fee

Yet as you can see you have something called liquidation ratio. If what the value you have in collateral is below this line you will lost the amount you borrowed plus liquidation fee 13%. We will make several scenario to see what can happen.

Let’s say I borrow 1000 DAI (1000$), put 10 ETH as collateral and have as above 150% of Liquidation Ratio.

Worst Scenario

In this bad case the price will go down and goes below your liquidation ratio. In this example ETH goes under 150$.

You will loose the amount you’ve borrowed (1000$).  You will have a 13% penalty because you went under liquidation ratio (130$).

In this case you will loose around  1130$ of ETH. Moreover your ETH have less value. You have to understand the risk of it as their is in any financial market.

Most Cases

In most cases you don’t put you at risk and are putting a good amount of collateral to be sure you are well above liquidation ratio.

In that scenario price almost didn’t move. So you had change your DAI to CRO to  stack them 1 year at 16%.

After this year you decide to pay your debt. So you pay back what you paid 1000$ in DAI which you’ve converted from CRO and your Ethereum and have earned at 16% during this time.

Best Scenario

Now let’s say that Ethereum price rise up. So you still have your collateral that has more value right now and you have earn CRO at 16% during one year.

You are winning a lot! Imagine that CRO also have a better price than where you made your deposit, then you had made a great investment.

You won from staking and from Ethereum price rising up! Eventually, you can easily paid your debt with the profits made.

So add value according to your economical situation. Play with finance will always be risky so be careful there is no guaranteed money.  Always look to be above the liquidation ratio and normally if the market stands or go higher you should make profit.

When you have set up your borrowing information and collateral you can generate the amount of DAI you want to have.


Vault DAI

In my scenario I have a collateralize ratio up to 280%. Right now ETH price is at 212$ so I’m well above my liquidation price which is at 112$ ETH.  

Reinvest my DAI

After generating my DAI I will go again on my app and look at my DAI deposit address.

So go on your wallet -> transfer -> deposit -> DAI. Copy the address and from OASIS in your Wallet Balance click on send in the DAI line. Then enter the amount you want to transfer and paste your DAI address.

Wait for the validation of your transaction (around 5 minutes) and you will have DAI in your app. 

Then you can stake at the high earning rate of

  • Keep it in DAI up to 10% (*if less than 500 MCO stacked)
  • Change it into CRO and earn up to 16% (*if less than 500 MCO stacked)

In the first case you will be sure to earn 10% of your earning. In the second one it is 16% but the CRO price can go down or up which can impact your return on investment!

Pay your Debt

When you decide that you want to close your smart contract loan you can easily do so by going into Paying back button in Oasis.

It will close your Smart contract and here it comes to an end!


Decentralize finance is a very interesting tool which has a lot of benefit. Let’s have a look at the advantages and disavantages.




You can earn from this platform:

  • stability fee low (even 0%)
  • Flexible reimbursement without time constraint
  • Decentralize leverage if Ether price rise up                   


No third party and you keep your privacy. You are not tracked. Sites is fully decentralized but teams works on security. It is a main subject very well handle with constant improvements and audits.

Moreover you don’t risk a centralize entity to stole and go away with your fund, it’s fully yours. Their can’t be any frozen account which is a big plus.





Financial risks from value as we saw earlier:

  • Stability fee (6% for USDC)

  • Liquidation threshold

  • Liquidation penalty                                        


If their is a hack their is not centralize company to help you (even if in reality MakerDAO foundation find way to help his users). 

Indeed, most of the time institution like banks are keeper of your funds and guarantee the security of it and provide you a support team for any problems.


Finally I gave you all my knowledge about OASIS and Decentralized Finance. It’s up to you to use it. I hope you have learn new things.

in my opinion, I have found a good answer at one of the issue I have. Now i have to make sure everything goes well until I have my 32 ETH!

ETH bullrun

Don’t hesitate to reach me if you have any question about this article. Have a good day!

Guillaume Niay