Bitcoin Forum

Other => Off-topic => Topic started by: alterra57 on September 03, 2023, 07:49:21 PM



Title: What methods do crypto exchanges use to keep track of users funds?
Post by: alterra57 on September 03, 2023, 07:49:21 PM
It's been a while since when I first started wondering about this and searching online didn't really help. I know there's some sort of an internal system keeping track of everything but how does it work? For example, the Phemex wallet I make deposits to for USDT has 10 or so million USDT in it, pooled funds from different users. How does Phemex keep track of which money belongs to who? Is there a system out there that's already made and ready to deploy?

TYIA.


Title: Re: What methods do crypto exchanges use to keep track of users funds?
Post by: odolvlobo on September 04, 2023, 04:08:57 AM
I'm not sure what level of detail you are looking for, but in simple terms they have a database that keeps track of how much of each coin is owned by each account. When you deposit USDT, they credit your account. When you withdraw USDT, they debit your account.

I assume that exchanges use proprietary software, but you might try looking at the open source payment processor BTCPay Server (https://btcpayserver.org)


Title: Re: What methods do crypto exchanges use to keep track of users funds?
Post by: alterra57 on September 04, 2023, 08:37:44 PM
I'm not sure what level of detail you are looking for, but in simple terms they have a database that keeps track of how much of each coin is owned by each account. When you deposit USDT, they credit your account. When you withdraw USDT, they debit your account.

I assume that exchanges use proprietary software, but you might try looking at the open source payment processor BTCPay Server (https://btcpayserver.org)

Thank you for the reply, I was wondering if there's a pre-built system out there ready to be played with. I've looked into btcpayserver but unfortunately it's BTC only.