Complete Guide to Crypto Wallets and Transactions

What is a Blockchain

The TL;DR - A blockchain is sets of transactions, divided into chunks of a certain size, and linked together one after another.

A blockchain is a distributed database that is shared among nodes of a computer network. As a database, a blockchain stores information electronically in digital format. Blockchains are best known for their crucial role in cryptocurrency systems, such as Bitcoin, for maintaining a secure and decentralized record of transactions, otherwise known as a transaction ledger.

The innovation with a blockchain is that it guarantees the fidelity and security of a record of data due to its inherent immutable nature and generates trust without the need for a third party.

One key difference between a typical database and a blockchain is how the data is structured. A blockchain collects information together in groups, known as blocks, that hold sets of information (like transactions). Blocks have certain storage capacities and, when filled, are closed and linked to the previously filled block, forming a chain of data known as the blockchain. All new information that follows that freshly added block is compiled into a newly formed block that will then also be added to the chain once filled.

Hashing and Immutability

The TL;DR - Hashing is math that tells you if data has changed. Because blocks in the blockchain are hashed, they can't be changed or they'd invalidate all of the new blocks in the chain. This means transactions can't be edited after the fact.

New blocks typically contain a hash of the previous block. A hash is a mathematical function that takes input data (like the previous block) and converts it to a fixed length output. The same input data hashed with the same algorithm will always produce the same output. If even one bit of the input data is changed, it will result in a vastly different output when hashed. Hash outputs cannot be reverse-engineered to determine what their inputs are.

Due to the way hashing works (detecting changes in inputs) and how blockchains are fundamentally formed (new blocks containing hashes of previous blocks) blocks in a blockchain become immutable - or unable to be changed - once they are closed and the next block is begun.

The immutable nature of blockchain means that once a transaction is finalized, there is no way to edit or delete the transaction. For example, if you were to mistakenly send funds to a scammer, there is no way to reverse the transaction after the fact to reclaim your funds.

Public Key Cryptography / Key Pairs

The TL;DR - Public and private keys are mathematically linked together, and there is no way to reverse engineer a private key with math. Anyone can encrypt data with your public key which is then only unlockable with your private key. Also, if you encrypt data with your private key anyone can verify it actually came from you using your public key.

Modern internet security - such as HTTPS web encryption which allows you to securely conduct bank transactions over the internet - is based on Public Key Cryptography. Blockchains utilize the same mechanism as a form of identity on the ledger to allow for transactions to take place.

Public/private key pairs are sets of values that are asymmetrically linked mathematically. A mathematical formula can be run on the private key to easily calculate the public key value however the private key cannot be calculated using the public key.

If data is encrypted using a public key, it can only be decrypted by using the matching private key belonging to that key pair. This means data intended for a specific person can be encrypted with their public key (visible to anyone) and will only be able to be decrypted by the person that public key represents (since they are the only one who has the matching private key).

Additionally, if data is encrypted using a private key, other parties can perform mathematical functions on the encrypted data using the matching public key to verify it was actually encrypted using the linked private key. This means the identity of the person who encrypted the data can be verified by another party using the matching public key (which is visible to anyone).

Public Keys (Wallet Addresses)

The TL;DR - Your public key is your identity on the blockchain and is linked mathematically to your private key. Your wallet address is a short-hand version of your public key.

public key is what allows you to receive cryptocurrency transactions and serves as your identity on the blockchain ledger. The public key is mathematically linked to your particular private key. When funds are sent to your public key, they are only "unlockable" or able to be spent by using your private key. 

Public keys are extremely long strings of characters. Due to this, your wallet address or blockchain address is typically a shortened version of your public key in order to make it easier to work with. The exact details and length depend on the technology used by the blockchain but for most blockchains, wallet addresses are typically 64 character long hashes of your public key.

Private Keys (Seed Phrases)

Never share your private key/seed phrase with anyone else! Anyone who gains access to your private key/seed phrase has control over all funds and items (NFTs, hotspots) belonging to your wallet and can do with them as they wish. Be sure to never lose your seed phrase or you will permanently lose access to everything contained in your wallet!

The TL;DR - Your private key allows you to control your funds on the blockchain. Anyone that has your private key has full control of your funds. Your seed phrase is just an easy-to-read version of the private key.

private key is mathematically linked to a particular public key and provides proof of ownership over any funds belonging to that public key/identity on the blockchain ledger. The private key is used to authorize the transfer of funds belonging to the public key/identity.

Private keys are extremely long strings of characters. Due to this, private keys are shortened using specific methods and converted into seed phrases. A seed phrase is a human readable version of your private key, typically in the form of 12, 24, or 25 English language words which are derived from a known list. These specific words, in their specific order represent your private key.

Your seed phrase can be imported into any supported wallet software to allow access to your funds. This is how cryptocurrency wallets are backed up and restored in cases of lost or broken devices, etc. This also means that if someone else gets ahold of your seed phrase, they can easily import it into a supported wallet software and simply transfer any funds out to a wallet they control (which you do not have the seed phrase of), essentially stealing your funds.

What is a Wallet?

The TL;DR - Wallets are software that handle your public and private keys, show your balances from the blockchain ledger, and let you interact with the blockchain to send funds or perform other actions.

Colloquially, most people think of a cryptocurrency wallet as their seed phrase, public address, and the coins they have. Technically, a cryptocurrency wallet is a piece of software which manages your public and private keys and allows you to interact with blockchains - typically by reading account balances, signing transactions, and interacting with smart contacts.

Cryptocurrency coins and tokens do not exist as their own entities. Using Bitcoin as an example, there are not literal "Bitcoins" rather the blockchain ledger is a collection of transactions and balances - rather than holding 1 Bitcoin in your wallet, what is really occurring is the blockchain ledger contains an entry stating "account XYZ has a balance of 1 Bitcoin" and the wallet software is able to read the blockchain and see that your private key has a balance of 1 Bitcoin according to the blockchain ledger.

Most cryptocurrency coins and tokens are what is known as fungible - meaning there is no discernable difference between the Bitcoin you own and the Bitcoin someone else owns. Some coins and tokens however are non-fungible, meaning they are distinct from each other and have attributes and identifiers - these are typically referred to as "NFTs". An example would be a Bored Apes image NFT or a Helium Hotspot Identity NFT on Solana. Supported cryptocurrency wallets can manage both fungible and non-fungible tokens.

How do Transactions Take Place?

The TL;DR - To send a transaction, wallet software packages up the details and digitally signs the transaction to prove the legitimate owner of the funds is the one sending them. Miners or Validators will mathematically verify the transaction came from the right private key and process the transaction, or reject it if it didn't. Only the holder of the private key can initiate the sending of funds or items from the associated wallet address, so don't let anyone get control of your seed phrase!

Whether you're transferring funds or interacting with a blockchain in another way (such as interacting with a smart contract, updating a hotspot's location, etc) transactions are typically structured in the same way. As an example, we'll look at a Bitcoin transaction:

In order to perform a transaction, you'll need to use wallet software compatible with the blockchain you're interacting with which will need access to your private key (you've imported your seed phrase into the software or created a new seed phrase with the software). This wallet software will handle constructing and transmitting the transaction for you, and will insert your public key (to identify where the funds are being sent from), the exact amount of Bitcoin you want to send, and the public key of the person receiving the funds. It will also handle transaction fees, which we won't cover in this example.

Once the transaction is constructed, the wallet will digitally sign the transaction in order to prove it was initiated by the controller of the private key (the rightful owner of the funds being sent). To digitally sign the transaction, the wallet will hash the transaction information and combine the hash with the private key using a mathematical algorithm to produce a digital signature. The transaction hash and the digital signature are sent to the blockchain entity responsible for validating transactions (in the case of Bitcoin, this would be a Bitcoin miner).

In order to validate the transaction and be sure it came from the rightful owner of the funds, the Bitcoin miner will mathematically inspect and verify the digital signature by combining the hash of the transaction, the digital signature, and the sender's public key. The result will either be a match (proving the rightful owner of the funds initiated the transfer) or not a match (transaction will be considered invalid).

Once the transaction has been validated and has been proven to be legitimate, it will be added to the next block in the blockchain and, once the block is finalized, will be broadcast to all nodes on the network

Once the transaction has been added to the blockchain and broadcast to all nodes, the transaction is complete and the sender will see their new lower balance while the receiver will see their new higher balance.

As we can now see, transactions are always initiated by the owner of the funds or items. Due to the way transactions work, there is no way to force a transaction - for example if you accidentally send funds to the wrong address, there is no way to forcefully take back the funds and the only way to get them back would be if the receiving party creates a new transaction to send the funds back to you. Anyone who controls a private key can create transactions to send funds or items from that public address - for this reason it is imperative to never reveal your seed phrase to another party!

Protecting Yourself From Scammers and Mistakes

The TL;DR - Back up your seed phrase and protect it from unauthorized access at all costs. Be aware of scammers posing as legitimate support agents. Outside of one very specific circumstance, MNTD./RAK will never ask you for your seed phrase in order to render support. You are responsible for keeping your own funds safe, so consider using a hardware/cold storage wallet!

Now that we have examined how blockchains, public and private keys, wallets, and transactions work it is clear that in order to maintain ownership of funds and items, the seed phrase associated with the wallet address must be protected at all costs. If anyone gains access to your seed phrase, they will be able to control the funds and items and transfer them to a new wallet that you do not have the seed phrase to.

Scammers are rampant on the internet, and unfortunately pervasive in the cryptocurrency space. They will often pose as support agents for legitimate companies and blockchain projects in an effort to trick users into revealing their seed phrase, which they will then import into a wallet software and immediately transfer all funds to a wallet they control. Once this happens, there is no way to retrieve the lost funds and items, and no one (not even MNTD./RAK or blockchain project developers themselves) can help you retrieve the lost funds or items. In the eyes of the blockchain, the rightful owner of those funds (the controller of the seed phrase) was the one who performed the transfer.

If you are asked for your seed phrase by anyone assume the individual is acting in bad faith and do not provide them with any information! Anyone sending you a private message offering support for your miners or Helium app and asking for your seed phrase in order to help is acting in bad faith and will steal funds if provided your seed phrase! If there is any doubt of the legitimacy of someone claiming to be a MNTD./RAK employee, please submit a ticket here so we can advise you properly.

This is the double-edged sword of cryptocurrencies and blockchains - we are all responsible for keeping our own funds safe, however we are also the only ones who have complete control over the funds so long as we manage them correctly. No one can forcefully transfer your funds out of your wallet, unlike with traditional finance where banks can adjust your account balance at a whim.

In order to guard against permanent loss of control over your funds, ensure you have created a backup of your seed phrase which will allow you to import it into another device or wallet software if needed. In order to guard against loss of funds, be sure to also store this seed phrase backup carefully and out of sight of prying eyes. Ensure you only type seed phrases into wallet software you have verified is legitimate, and only on devices you are sure are not compromised. If a hacker was able to compromise your device, they can record the seed phrase you enter into the wallet and use it at a later date to steal funds.

Many cryptocurrency users advocate for the use of a hardware or cold storage wallet which does not expose the private key of wallets it generates to the internet which adds an additional layer of security not possible with other wallet solutions.

No matter the wallet and backup solution you use, be sure to be aware of scams and take steps to protect yourself.

Updated