Click here to Skip to main content
15,606,438 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
Good morning everyone, how are you? hope so.

So I am seeking insight into an issue involving the logic behind programming a cryptocurrency exchange.

I'm trying to understand how every internal issue of an exchange works.

Come on.

I want to build a wallet where it receives coins from a wallet.

I'm currently using ethereum's web3 to build the portfolio.

but what is not entering my head is the logic behind it, I am not able to visualize some issues.

I have done the following so far: the user creates the account and the system already creates a wallet in the database and assigns it to it

blz but what i cant visualize?
when I develop the trade, how will the rate issues for blockchain work from what I saw, the exchanges are all set internally?
How is the logic of communication between the trade and the portfolio?
I would be having to use a web socket, correct?
but how do I deal with communication between portfolios, trade and blockchain?

I'm in a moment of blocking, if you can help me with the logic and understand it better, I appreciate it.

If you are interested in blockchain projects, please contact me.

and if you have any links related to this subject, even if it's in korean I'm accepting.

thank you, grateful for your attention.

What I have tried:

I created the wallet, but I can't see this , can someone expand my mind?
Updated 19-Nov-21 3:31am

1 solution

You are asking a BIG question, and it isn't clear what you need help with. The following is based on my understanding, but I am not an expert in this.

An exchange has a wallet of its own. This wallet holds all of the tokens that users have not moved to their own wallets outside the exchange. A user's portfolio states how many tokens in the exchange's wallet actually belong to the user.

The major use cases are
o create a wallet for the exchange
o create a user/password/portfolio
o user transfers funds to/from portfolio
o user buys/sells tokens on the exchange (the tokens move in/out of the exchange's wallet, and the user's portfolio is updated)
o user transfers tokens to/from exchange (this occurs between the user's and the exchange's wallet and updates the user's portfolio)

Note that the exchange does not host a user's wallet, only the user's portfolio. The user's wallet is external, and only the user has its private key. The exchange can also provide a way for a user to create a wallet, but the user can also create it independent of the exchange.
Share this answer
Member 15436954 19-Nov-21 10:06am    
OK, I understand your point of view, but we can see the binance that does not provide the user with the private key (I believe it is a security measure protecting the user from himself).

we can see the binance where my portfolio has a dollar value that is not mine see :
so what logic should i use?
I'm currently using web3 to create the portfolios, will I have a problem when making an integration/connection with a trading system?

and what logic should i use to build this?
Am I looking at the wrong point of view?
Greg Utas 19-Nov-21 11:30am    
I don't know anything about binance and don't trade cryptos myself. I've only read about them and cannot answer your question in any more detail. As far as private keys are concerned, the exchange must carefully guard its own, or all of the tokens that it owns on behalf of users can get hacked. For the same reason, a user must guard their own private key. There is no way I would trust an exchange that did not give me my private key or allow me to transfer tokens to my own external wallet.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900