CeFi, DeFi: The renewal of Savings

These days banks have the monopole of savings rate but a new trend is coming up to bring new adversity. It offers new rates and new rules providing an alternative to the old financial system. In this article you will see what can the alternatives on Fiat bank saving accounts(Fiat is currency such as Dollar, Euro, Yuan…) within the crypto ecosystem.

Disclaimer: This is not a financial advisement. Investing is at your own risk. This article only goal is to provide information and explanation on this new system growing up.



stablecoin is a reproduction of a currency such as dollar. It can be provided by a companyTether with USDT, Circle with USDC) or by a smart contract (DAI). Those entities or programs ensure that they have one dollar in the blockchain equals one dollar in the banking system.



Centralized Finance  (CeFi)

Centralized Finance is very similar with our current banking system. You have an entity/company in which you invest your funds. These companies provides large amount of financial product which is a mix between traditional banks and new economy.


Decentralized Finance (DeFi)

Decentralized Finance retakes the idea of no middle man as wanted Satoshi Nakamoto the Bitcoin founder. The process is fair and transparent while allowing everyone to use it. It’s permissionless and automatized by smart contract running on Blockchain applications.


Banking system

In current banking system we can earn money by putting our money into financial product. In France we have the “Livret A” a flexible earning placement which provides 0,5% per year

It doesn’t even repay inflation.


Current CeFi such as Coinbase,Nexo,Crypto.com are providing a lot of financial product within which stablecoin (crypto that is pegged to the dollar).

You can earn up to 12% per year


DeFi product such as SushiSwap,Aave, Oasis (cf my article on Oasis here) are providing earning with lending, farming, liquidity provider program. 

It can goes from 2% to 30% per year depending on the platform and period.


Centralized finance platform such as Binance or Crypto.com, on which I did an article a year ago, provides good rates while having the insurance of a company if there is any trouble (fund loss, helpdesk…). They provide currency exchange platform (including Fiat), borrowing & lending, earnings, derivatives, and many more.

They make money mainly on exchange transaction fees. For them the goal is to attract user to have a maximum of volume to improve their revenue.

They provide a lot of earning possibilities and aspire to become the Bank 3.0.










Aave is a remarkable Lending & Borrowing platform. You can borrow by putting a collateral asset such as ETH and borrow a stablecoin.

The lenders who provide liquidity are rewarded by an annual yield percentage:

Rates can change according to the market needs and you can withdraw your fund at any time.

This solution allows lending and borrowing without middle man. The trust is now on the smart contract.


SwissBorg is a company that provides Yield (revenue) when providing asset for them. They have an algorithm that select the best platform yield percentage and gives you daily reward with a security in case of loss (special program, insurance…) .

This is a good use case of Company using DeFi.

Liquidity Providers


Uniswap is the most used decentralized exchange platform. To be sure that their is liquidity on their exchange assets, they reward people who provide liquidity. They will be rewarded by getting tax fees of the transactions on this pair.

Let’s say you have ETH and DAI you can provide liquidity by putting ETH & DAI into the Liquidity Pool.

You’ll get a percentage of the fees as a reward (according to the amount you provide divided by total pool amount) as you can see above.

Yield Comparison




6% On flexible Terms

8% if Premium

12% If Premium and 3 Month Fixed terms Period


5% on Flexible Earning

Instant withdraw

Up to 8% on fixed terms savings


Average of 20% with Premium

Standard 10%

1 Day to withdraw



At time of writing:

Around 8%


At time of writing:

 Around 8%


At time of writing:

Around 8%

In this example I used Yield percentage on USDC the most secure stablecoin on the market at the writing time of this article. It is backed by Circle Square company with many audits on their accountability to verify that every USDC on the crypto market is backed by US dollar.










To conclude, there is a lot of ways to invest your sleeping money elsewhere than in your Bank account with low interest.

 Of course this new bank and new world may not be as secure as this big company bank yet they have the merit to offer an alternative.

Afterward, if you want to stay in more centralized way as in your bank you can use centralized platform that offers security. 

If you want by conviction to fully avoid bank system DeFi offer a great opportunity to be sure that you have financial liberty and freedom. Be careful if a bank can be robbed so is those platforms. Even if the risk stay very low, their isn’t 100% security in neither in those solutions only pros and cons. Then it’s up to you to make your own decision according to figure on the right.

On my side I’m lucky enough to have Swissborg Premium so this is where I rather put my money. Yet I’ve used DeFi & CeFi and I was very please by the services, I just went where the yields are higher (and provides enough security).


Hope this article can help you to rethink on how to use your money and gives enough information to improve your knowledge on that part.

Don’t hesitate if you have any questions regarding this topic!


CeFi, DeFi: The renewal of Savings 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:\pathofyourpythonfile.py"

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 yourfilepath.py >> 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