Knowledge base
Knowledge base: from blockchain to smart-contract code
The articles follow a learning path. Start with the basics, work your way up to how the Ethereum virtual machine runs code, and read through a real escrow contract.
Learning path
Level 1: Basics
Words and ideas. No code needed. For those just meeting crypto.
- 1
What is a blockchain, in plain words
How a blockchain works - a shared ledger nobody can rewrite alone. Blocks, hashes, consensus and why you can trust it.
3 min read - 2
What is cryptocurrency and where do coins come from
How cryptocurrency works - how it resembles money and how it differs, where coins come from, what a coin and a token are, and why prices swing so much.
4 min read - 3
Bitcoin vs Ethereum - the difference and why deals are built on Ethereum
Bitcoin and Ethereum compared - goals, accounting model, smart contracts, consensus and fees. Why guarantor deals run on Ethereum and its L2 networks.
3 min read - 4
Hash functions in plain words - a data fingerprint that cannot be forged
What a hash function is, its properties, why a blockchain needs it, how keccak256 differs from SHA-256 and where you meet hashes every day.
3 min read - 5
Public-key cryptography - how a signature proves it is you
How private and public keys work, where an address comes from, what an ECDSA digital signature is and why a wallet needs no password. With a clear example.
4 min read - 6
Crypto wallet, address and seed phrase: how not to lose your money
How a crypto wallet works - private and public key, address, seed phrase, wallet types and the main security rules for a beginner.
4 min read - 7
What is a smart contract and why you can trust it with money
A smart contract is a program on a blockchain that executes a deal's terms by itself. How it works, how it differs from an ordinary contract and what its risks are.
4 min read - 8
Tokens and NFTs - what they are, how they differ and where they are used
An overview of tokens on Ethereum - fungible (ERC-20) and unique (NFTs, ERC-721 and ERC-1155), how they work, where they are used and what risks they carry.
3 min read - 9
Stablecoins: USDT, USDC, DAI - how they differ and what the risks are
What a stablecoin is, how it holds a one-dollar price, how USDT, USDC and DAI differ, and which risks to consider when holding and accepting them in deals.
3 min read - 10
dApps and DeFi - decentralised applications and finance without middlemen
What dApps and DeFi are, how decentralised exchanges (AMM) and lending work, what collateral and liquidation are, and the risks of decentralised finance.
3 min read - 11
Escrow: how a deal with a guarantor works
What escrow is, how a classic guarantee differs from a smart contract, and how the roles of buyer, seller and guarantor protect both sides of a deal.
4 min read - 12
Where escrow is used - 10 real-life scenarios with examples
Ten scenarios where a secure smart-contract deal is useful - freelance, goods, domains, rentals, B2B and more. What fits, what does not and what to look at.
3 min read - 13
Scams in P2P deals: 10 red flags
How scammers cheat in deals between people - pressure, fake guarantors, phishing, swapped addresses. Ten warning signs and how escrow protects you.
4 min read - 14
Glossary - blockchain, wallets, smart contracts and escrow from A to Z
A concise glossary of blockchain, wallets, transactions, tokens, security and Coin-Trust terms. Each term links to a detailed article.
5 min read
Level 2: Practice
How it all works in a wallet and in deals. For those who already use a wallet.
- 15
The deal lifecycle - from offer to payout, step by step
A full walkthrough of a Coin-Trust deal: offer, acceptance, performance, completion, cancellation, expiry and dispute. Who can do what and how much they get.
5 min read - 16
Network fees (gas), L1 and L2: which network to choose for a deal
What gas is and why fees differ on Ethereum, Base, Polygon and BNB Chain. How L1 and L2 work, what the fee consists of and how to pick a network.
4 min read - 17
Layer 2 and rollups - how Ethereum became cheaper and faster
Why second-layer networks exist, how optimistic and ZK rollups work, what a sequencer and withdrawal are, and how an L2 like Base differs from the main network.
4 min read - 18
How to choose a network for a deal - Ethereum, Base, Polygon or BNB Chain
A comparison of Coin-Trust networks by security, fees, tokens and speed. How to pick a network for the deal amount and the mistakes beginners make when choosing.
3 min read - 19
Anatomy of a transaction: nonce, gas, mempool and confirmations
What happens from pressing "Sign" to confirmation in a block - transaction fields, nonce, mempool, inclusion in a block, finality and why transactions get stuck.
4 min read - 20
ERC-20 and approve: why the “approval” and what unlimited means
How ERC-20 tokens (USDT, USDC, DAI) work, why a separate approve signature is needed before depositing and how to manage approvals safely.
4 min read - 21
Wallet security checklist - 15 rules that protect your money
A practical checklist - how to store a seed phrase, separate wallets, check signatures and approvals, use a hardware wallet and what to do after a compromise.
4 min read - 22
Phishing and address poisoning - how the attacks work and how to protect yourself
A breakdown of typical attacks on wallet users - fake sites, malicious signatures and approvals, fake support and address poisoning. With examples and defences.
4 min read - 23
ENS - readable names instead of long Ethereum addresses
What ENS and .eth names are, how a name turns into an address, why it is convenient yet risky, how reverse resolution works and how to verify an address.
4 min read - 24
Bridges between networks - how assets are moved and why it is the riskiest place
How blockchain bridges work (lock-and-mint, liquidity pools), how a native bridge differs from a third-party one, the known hacks and how to move money more safely.
3 min read - 25
How to read Etherscan: checking a contract, a transaction and events
A practical guide to block explorers (Etherscan, Basescan, Polygonscan, BscScan) - how to check an address, a transaction, a contract, tokens and approvals.
4 min read - 26
How to verify a smart contract before using it - a step-by-step guide
A step-by-step contract check through a block explorer - address, verified source code, owner and rights, proxies, events, and caution with tokens.
4 min read - 27
Coin-Trust fees by example - how much you pay and to whom
A breakdown of the service fees: the 1% platform fee, the guarantor's rate (base and dispute) and gas. Tables for every deal outcome on a 1000 USDC example.
4 min read - 28
How arbitration works in escrow: incentives, deadlocks and abuse protection
Dispute mechanics in the smart contract: the guarantor's two rates, the 30-day timeout with a 50/50 split, mutual cancellation and abuse protection.
5 min read - 29
How to choose a guarantor - criteria, rates and red flags
Who can be a guarantor in Coin-Trust, by what criteria to choose one, how to agree on rates and what to watch for so that a dispute does not become a problem.
4 min read - 30
Preparing for a dispute - what evidence to collect and how to present it
A practical guide for buyer and seller: what evidence a guarantor needs, how to preserve conversations, photos and video, and how to present your position.
4 min read - 31
Hash commitment: fixing a deal's terms without revealing them
How a keccak256 hash records a contract's fingerprint on the blockchain without publishing the text, and why swapping the document becomes impossible.
5 min read - 32
How to write deal terms that protect both sides
Drafting terms in practice: what to specify, how to describe results and deadlines, acceptance criteria, typical mistakes and templates for services and goods.
4 min read - 33
Use case - a 1,500 USDC freelance project paid by stages
A step-by-step example of ordering development through escrow: splitting into stages, terms, client and contractor actions, fee calculation and a partial dispute.
4 min read - 34
Use case - selling a physical item with delivery through escrow
A step-by-step example of selling a camera for 650 USDC to another country: the seller's offer, inspection terms, delivery, confirmation and a defect dispute.
4 min read - 35
Use case - selling a domain and digital goods through escrow
How to safely sell a domain, account or licence for 2000 USDC: the risk of takeback, handover order, file verification by hash and the checking window.
5 min read - 36
Multisig and timelock - managing a contract without a single point of failure
What a multisig (m of n) and a timelock are, how wallets like Safe work, which risks they close and which they do not, and how to use them for an owner or guarantor.
4 min read
Level 3: Under the hood
Bytes, gas, Solidity and security subtleties. For developers and the curious.
- 37
Ethereum accounts and state - EOAs, contracts and the world state
How Ethereum accounts work: EOA and contract, the four account fields, the world state, contract addresses and the units wei, gwei, ether.
4 min read - 38
The EVM under the hood: stack, memory, storage, calldata and the cost of gas
How the Ethereum virtual machine executes a smart contract - the stack architecture, data areas, opcodes, operation prices and why storage packing saves money.
5 min read - 39
A tour of the Solidity language - types, functions, errors and events by example
A short practical tour of Solidity for those who can read code: contract structure, types, visibility, modifiers, errors and events. Examples from the escrow.
4 min read - 40
ABI: how a function call turns into bytes - selectors, calldata and events
How smart-contract calls are encoded - the function selector, argument alignment, dynamic types, custom errors and event topics, with real examples.
5 min read - 41
Events and logs: eth_getLogs, bloom filters and public RPC limits
How smart-contract events work, how to read them via eth_getLogs, why public nodes cut the block range and how to build deal history without your own database.
5 min read - 42
ERC-20 from scratch - writing a token in Solidity and analysing every line
A minimal ERC-20 implementation in Solidity: balances, transfers, allowances, events, common mistakes and why proven libraries are needed in production.
5 min read - 43
Signatures in Ethereum - ECDSA, ecrecover, personal_sign and EIP-712
How a signature (r, s, v) is built, how a contract verifies it via ecrecover, how personal_sign and EIP-712 differ, and what permit and EIP-1271 are.
4 min read - 44
Writing escrow in Solidity: the state machine and a real contract walkthrough
How an escrow contract is built in Solidity: statuses, transitions, access checks, events and payouts - a minimal version and the production contract.
8 min read - 45
Integer math and rounding in smart contracts
Why Solidity has no fractions, how basis points work, the order of multiplication and division, overflow checks, mulDiv and calculating shares by subtraction.
5 min read - 46
Storage layout and variable packing in Solidity
How a contract stores data in 32-byte slots, how variables are packed, where mappings and arrays live and how the Coin-Trust deal struct is laid out.
4 min read - 47
Access-control patterns in smart contracts - owner, roles and deal parties
How contracts decide who may do what: Ownable and Ownable2Step, roles, checking deal parties, pauses and least privilege. A walkthrough using the escrow.
4 min read - 48
Reentrancy, checks-effects-interactions and pull payments
How the reentrancy attack that hacked The DAO works and how to defend against it: operation order, ReentrancyGuard and deferred payments, using escrow.
6 min read - 49
Non-standard tokens: USDT without a return value, fee-on-transfer and blacklists
What surprises ERC-20 tokens hide - USDT with no return value, transfer fees, address blocking, different decimals - and how an escrow contract defends itself.
5 min read - 50
A catalogue of smart contract vulnerabilities: 12 classic mistakes and defences
An overview of frequent contract vulnerabilities: reentrancy, access control, overflow, oracles, signature replay, DoS. With examples and the escrow's defences.
5 min read - 51
Proxies and upgradeable contracts - delegatecall, UUPS and the price of flexibility
How proxy contracts work, what delegatecall does, how Transparent and UUPS differ, why EIP-1967 slots are needed and why Coin-Trust chose an immutable contract.
5 min read - 52
CREATE2: how the same contract address appears on four networks
How CREATE2 works: the address formula, salt and bytecode, and why the escrow contract has the same address on Ethereum, Base, Polygon and BNB Chain.
5 min read - 53
Merkle trees and membership proofs - verifying millions of items with one hash
How a Merkle tree is built, what a root and a proof are, how a contract verifies an element's membership, where this is used and which attacks exist.
4 min read - 54
Oracles and the oracle problem - how a blockchain learns about the outside world
Why a contract cannot learn a rate or an event result alone, how oracles work (Chainlink, TWAP), why price manipulation is dangerous and who the oracle is in escrow.
4 min read - 55
Gas optimization in Solidity - 12 techniques and when they apply
Practical gas-saving techniques for smart contracts: storage packing, calldata, caching, immutable, unchecked and the main rule - never trade away security.
4 min read - 56
EIP-1559 - how the Ethereum fee market works (base fee, tips and burning)
How fees work after the London upgrade - the base fee, the priority tip, maxFeePerGas, automatic 12.5% adjustment and ETH burning. With calculations and examples.
4 min read - 57
Proof of Stake and finality - how Ethereum agrees on blocks
How Ethereum consensus works after The Merge: validators and stake, slots and epochs, finality in 13 minutes, slashing, reorgs and how many confirmations to wait.
4 min read - 58
Rollups under the hood - batches, fraud proofs, ZK, blobs and withdrawals
The design of rollups: the sequencer and batches, publishing data (calldata and EIP-4844 blobs), fraud and validity proofs, forced inclusion and withdrawal to L1.
4 min read - 59
MEV and front-running - who earns from transaction order and how
What MEV is, how sandwich attacks, arbitrage and liquidations work, how searchers, builders and MEV-Boost fit together and how to protect yourself.
4 min read - 60
Account abstraction (ERC-4337) - smart wallets, gas sponsorship and access recovery
What account abstraction and ERC-4337 are: UserOperation, bundler, paymaster, smart-wallet advantages over an EOA, social recovery and the risks.
4 min read - 61
HD wallets - how 12 words yield all your keys (BIP-39, BIP-32, BIP-44)
How a seed phrase turns into keys: BIP-39 entropy and wordlist, PBKDF2, the BIP-32 hierarchy, the BIP-44 path for Ethereum and the passphrase. With examples.
4 min read - 62
Foundry for beginners - compiling, tests, fuzzing and a local network
A practical introduction to Foundry: installation, project structure, unit tests, vm cheatcodes, fuzzing and invariants, forge, cast and anvil, with an example.
6 min read - 63
Testing smart contracts: unit, fuzz, invariants and static analysis
How contracts holding money are verified: unit tests, fuzzing, solvency invariants, evil token mocks, Slither and Mythril - with an escrow built in Foundry.
5 min read - 64
Audits and bug bounties - how smart contracts are examined and how to read a report
How a smart contract audit proceeds, the severity levels, what an audit is not, how to read a report, and how bug bounties and auditing contests work.
4 min read
Glossary
Short definitions from "blockchain" to "guarantor rate", linking to the detailed articles.
Still have questions?
Answers to the most common ones - fees, disputes, deadlines, networks and safety - are collected in one place.

