9

I'm new to Cardano and would like to know about this blockchain. I'm from Ethereum and I use Metamask as my "wallet" for it. I usually have one address only for one Metamask wallet. I'm curious to know how a Cardano wallet (say Yoroi) achieve multiple addresses when it's a single wallet only (I can make multiple wallets in Yoroi, yes, but a single wallet can generate multiple addresses, and I'm curious how that works; I'm also wondering if it's really possible in the first place and Metamask just doesn't do it).

Maybe I have misunderstood wallet addresses to receiving addresses, so any clarifications would be helpful.

2 Answers 2

10

Your “wallet” is really just a private key that only you know. You can use that key to deterministically generate many addresses, each address with a unique index. But no one can derive those addresses for you without knowing your private key.

This is similar to something like SSH, where you have a private/public key pair, but you can have public key 1, public key 2, public key 3, etc.

When you add your private key to Yoroi, the wallet app can regenerated all your addresses for you and check each of them for UTxOs. If it checks the first (let's say) 50, and they all have UTxOs owned by them, the wallet app will keep generating more until it doesn’t find any more funds (in theory you could use your private key outside the wallet app and generate an address for index 1000000+, and if you have funds sent to that address they might not show up on Yoroi, but you would still own them). This total at all of your addresses is your total balance.

Generating addresses like this is great for privacy, since it’s hard for people other than you to determine which addresses are associated with each other. But not entirely impossible with off-chain data.

Bitcoin works in a similar way.

3

Wallet addresses are public keys mathematically derived from private keys and encoded to a special format. The ability of a wallet to generate multiple addresses is determined by the implementation of a method known as Hierarchy for Deterministic Wallets (HD), originally introduced in BIP-32 for Bitcoin.

When using such a wallet, a root private key is created and, from it, multiple child public keys can be derived. The public keys are linked to that private key which means that funds received in these addresses can be spent using that single private key. In Cardano, Yoroi is a HD wallet.

You can get some more technical details on how addresses are created in Cardano: Here and Here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.