Hacker News new | ask | show | jobs
by __MatrixMan__ 1231 days ago
A "wallet" is a client side concept, all the blockchain sees is "addresses" (we're talking BTC here, but it's common elsewhere too). Most wallet software will create many separate addresses for a user and the "wallet balance" will be their sum. Which addresses can be correlated with each other by an adversary will depend on usage patterns.

For instance if you receive $5 and then later send $5, your wallet can just send it from a single address, so none of the other addresses in your wallet can be correlated (via chain analysis) with that transaction. On the other hand, if you have addresses with $2 and $4 and you wand to send $5 then both will be involved in the transaction, plus you'll be getting a new address where you get the change ($1) back.

It would be the same for an exchange. A single address (or a hard-coded list of them) would be a centralizing feature, if it has that, it's not a DEX (because whoever controls the keys for those addresses controls the exchange). A DEX would have to make buy/sell orders happen based on some set of addresses that were not around for the founding of the exchange. Likely, those addresses would also not stay around for its lifetime. You'd generate them as needed and forget them when they no longer served you (I suppose "you" are a DEX node in this scenario).

What's uncertain is just how interconnected they'd have to be. On one hand, you want to keep the list of known associates small so that token taint doesn't spread to all users of the exchange (which is what you described in your previous post). On the other hand, maybe you want the list of participants to be large enough that it's not practical to send an agent to kick down each door in the list.

If anybody can find the maximally infuriating size here, I'd trust that it's the kind of person who would write a DEX.