Part 11: System Architecture


Today, we will talk about the required system architecture to accommodate all the requirements we defined before.


Watch on Youtube    Back to Course Index

Hi. Good morning guys. 

This is your one stop channel to become a full stack blockchain engineer.

This is part 11 of the whole course on how to build a Crypto E-Wallet and Exchange System using Odoo.

And congratulation! We have been learning together this far. In the next parts, we will be talking much more in technical details, so, more attention and focus is definitely required.

In this part, we will start designing the system architecture, that will be capable of fulfilling the system requirements we defined before.

We will start with designing the software stacks required, then define the addons to develop in Odoo framework. 

We will utilize docker containerization framework to achieve this.

Before continuing, please consider to like, share, and subscribe our channel if you find it useful, as we will update the topics of Building E-wallet Exchange system with Odoo regularly.

Ok, now let's talk about the system architecture in details.




Odoo Framework

First of all, we will use Odoo framework to develop our entire system.

We need to develop an addon that act as a payment gateway client. This addon will interface with third party payment gateway system, that will communicate with local banks and credit card providers.

This addon is responsible for handling fiat money deposit, using bank transfer to virtual account, and credit card, as well.

This addon is also responsible for withdrawal process, to local bank accounts supported by the payment gateway.


JSON REST API

We will also provide APIs for mobile and web frontend clients to access our system. This can done by the built in web services Odoo provided, the JSON RPC or XML RPC protocol.

But, we will develop our own REST API client, so that the mobile and front end web developers can easily develop their application, using simple JSON REST API.

We will be using OCA REST Framework to develop our own REST web services.


Bitcoin Network

Next, we will need to interface to the blockchain network to do some task related to blockchain transactions.

For example, create new wallet address, submit transfer transaction, receive crypto currency, querying for transaction status, etc.

The implementation will be specific to each network.

For Bitcoin network, we will be interfacing with our own Bitcoin Node. Will will run a bitcoin.d docker stack, that will connect to the bitcoin blockchain network in real time.

Then, we will develop an Odoo addon that will interact with that node, by utilizing python module called python-bitcoin-rpc.

By using this python module, our addon will be able to create new wallet address, send bitcoin from one address to another, checking a wallet address balance, querying for transaction status, etc.


Ethereum Network

For Ethereum network, we will be interfacing with our own Ethereum Node. Will will run a open-ethereum docker stack, that will connect to the ethereum blockchain network in real time.

Then, we will develop an Odoo addon that will interact with that node, by utilizing python module called python-web3py.

By using this python module, our addon will be able to create new wallet address, send ethereum from one address to another, checking a wallet address balance, querying for transaction status, etc.


Other Blockchain Network

For connecting to other blockchain networks, we will implement the same approach. This includes, running that network node to be able to connect and sync to the blockchain, developing the addon to interface to the node, by using the respective python modules for the network.

For example, we can actually connect to Binance Chain, Solana, Avalanche, Fantom, etc, as long as we setup the correct infrastructure.

Some networks are derived from Ethereum source code, so we can actually use the same python module, the python-web3py, to interact with those Ethereum-forked networks.


Crypto Price Provider

Next.

We will need to continuously monitor the cryptocurrency price from the credible source. Here we will use CoinMarketCap website API.

So, we will develop an addon that will access that API using a special API Key, to get the quotes of all cryptocurrencies we currently support on our system.

The addon simply run a cron job periodically, get the price quote, and update the currency rate data on odoo at the time it get the quotes.

Then, our system will be ready for the customer to do buy and sell transaction on every supported cryptocurrency, with real time market price.


Authentication Server

Optionally, we can use third party authentication servers for our system, like OAuth, so that our customers can access our exchanger system using OAuth providers, like Google, Facebook, Twitter, etc.

In this case, we must install the OAuth client addon, to be able to interact with those auth providers.


KYC Provider

Next. We will also need a "Know Your Customer" (KYC) provider, to verify the identity of the customers and assess their potential risks for money laundering or financing terrorism.

The KYC process typically involves collecting and verifying a customer's personal and financial information, such as their name, address, date of birth, and government-issued identification number.

This information is used to confirm the customer's identity and ensure that they are not on any lists of known or suspected illicit actors.

The goal of KYC is to prevent our system from being used for illegal activities and to comply with relevant laws and regulations.

We will develop an addon to interact with that kind of KYC server, by accessing their API to verify customer data above, and get the final result of the identity verification status.


Hardware Wallet

Lastly, we will need a hardware wallet. A hardware wallet is a physical device that is designed to securely store cryptocurrency private keys. It typically looks like a USB drive and allows our system to store customer's private keys offline, which reduces the risk of their keys being stolen by hackers.

Hardware wallets are considered to be one of the most secure ways to store cryptocurrency, as they provide an additional layer of security beyond just a password or passphrase.

They typically use encryption and other security measures to protect the private keys and prevent unauthorized access.

In order to access the keys and perform transactions, our system admin must physically confirm their actions on the device, which helps to prevent unauthorized transactions.

Some examples of popular hardware wallets include the Trezor and the Ledger Nano. These devices are typically small and portable, and can be easily carried with you to ensure that your keys are always available when you need them.


Ok, those are the minimum system architecture to be deployed to fulfill our software specification.

Please consider to like, share, and subscribing our channel if you find it useful, as we will update the topics of Building E-wallet Exchange system with Odoo regularly.

Thanks for watching.