What This Covers
Blockchain fundamentals and practical interaction — the technology, not the speculation.
In scope: Distributed ledgers, consensus, transactions, smart contract interaction, wallets, token standards.
Out of scope: Trading strategies, price analysis, specific DeFi protocols, Solidity development (see dedicated skills).
Core Concepts
| Concept | One-liner |
|---|
| Distributed ledger | Shared database synchronized across nodes, no single owner |
| Consensus |
How strangers agree on truth without trusting each other |
| Immutability | Changing history requires re-doing all subsequent work |
| Smart contract | Code that executes automatically when conditions are met |
| Gas | Fee paid to network for computation |
For mental models and analogies, see concepts.md.
Developer Quick Reference
CODEBLOCK0
Common traps: missing allowance checks, wrong decimals (ETH=18, USDC=6), not awaiting confirmations.
For full patterns, see dev.md.
When to Use Blockchain
✅ Use when: Multiple parties need shared truth, no trusted authority exists, immutability is critical, settlement costs are high.
❌ Don't use when: Single org controls data, you trust a central authority, data needs deletion (GDPR), or a database solves it.
The Database Test: Would PostgreSQL with audit logs solve this? If yes, skip blockchain.
For decision framework and enterprise platforms, see evaluation.md.
Security Essentials
- - Seed phrase = master key — never share, never screenshot
- Hardware wallet > software wallet > exchange
- Test transactions before large transfers
- Verify URLs obsessively — phishing clones are sophisticated
For wallet security and scam patterns, see security.md.
涵盖内容
区块链基础原理及实际交互操作——关注技术本身,而非投机行为。
涵盖范围: 分布式账本、共识机制、交易处理、智能合约交互、钱包应用、代币标准。
不涵盖范围: 交易策略、价格分析、特定DeFi协议、Solidity开发(参见专项技能)。
核心概念
| 概念 | 一句话解释 |
|---|
| 分布式账本 | 跨节点同步的共享数据库,无单一所有者 |
| 共识机制 |
互不信任的各方如何就事实达成一致 |
| 不可篡改性 | 修改历史记录需重做所有后续工作 |
| 智能合约 | 条件满足时自动执行的代码 |
| Gas费 | 为网络计算支付的费用 |
思维模型与类比说明详见 concepts.md。
开发者快速参考
typescript
// 读取合约(viem)
const balance = await client.readContract({
address: TOKEN, abi: erc20Abi,
functionName: balanceOf, args: [wallet]
})
// 写入操作需钱包签名+等待确认
const hash = await walletClient.writeContract({...})
const receipt = await client.waitForTransactionReceipt({ hash })
常见陷阱:遗漏授权检查、小数位数错误(ETH=18位,USDC=6位)、未等待交易确认。
完整模式说明详见 dev.md。
何时使用区块链
✅ 适用场景: 多方需共享可信数据、无可信权威机构、不可篡改性至关重要、结算成本高昂。
❌ 不适用场景: 单一组织控制数据、存在可信中心机构、需删除数据(GDPR合规)、传统数据库即可解决问题。
数据库测试法: 带审计日志的PostgreSQL能否解决?若能,则无需使用区块链。
决策框架与企业平台说明详见 evaluation.md。
安全要点
- - 助记词=主密钥——切勿分享或截图
- 硬件钱包 > 软件钱包 > 交易所
- 大额转账前先进行测试交易
- 反复验证网址——钓鱼克隆技术日益精良
钱包安全与诈骗模式说明详见 security.md。