Skip to content

Commit

Permalink
feat: web3知识内容
Browse files Browse the repository at this point in the history
  • Loading branch information
梁怀刚 committed Jul 12, 2024
1 parent 7b24c16 commit 67aeb91
Showing 1 changed file with 155 additions and 0 deletions.
155 changes: 155 additions & 0 deletions docs/知识点/web3.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,155 @@
## web3 的常见问题:
1. 什么是web3?web2和web3的区别?
2. PoW(工作量证明)和PoS( 权益证明)有什么区别?
3. 比特币和以太坊有什么区别?
4. 什么是智能合约?
5. 公钥和私钥?
6. 简要说一下什么是dapp,dao , gamefi, defi?
7. 什么是Gas?
8. 你用一句话讲一下amm机制?
9. 你玩过一些什么应用?
10. opensea和looksrare的区别?

## 元宇宙
![img](https://cdn.jsdelivr.net/gh/HarryPoint/oss@main/uPic/2024-07-12_22:31:48_A07Agb.png)

## NFT

NFT(Non-fungible token), 不可互换的代币。

> FT: 同质化代币,例如 BTC
NFT类型:
- 土地NFT:例如 Decentraland、 Otherside、Sandbox
- 游戏NFT:例如 Player to Earn: Axie infinity
- 数字藏品NFT:例如 `Everydays: The First 5000 Days`, `Murakami.Flowers`
- 数字孪生NFT:例如 数字虚拟人

## web3.0

![img](https://cdn.jsdelivr.net/gh/HarryPoint/oss@main/uPic/2024-07-12_22:53:12_B5Zdcd.png)

## 区块链

- 定义:区块 + 链
- 特征:去中心化、共识机制(PoW和PoS)、不可篡改
- 类型:公链、私链、联盟链、混合链

区块链类型:

| | 公链 | 私链 | 联盟链 |
| :------: | :----: | :----------: | :--------: |
| 准入限制 ||||
| 读取者 | 任何人 | 仅限受邀用户 | 相关联用户 |
| 写入者 | 任何人 | 获批参与者 | 获批参与者 |
| 所属者 || 单一实体 | 多方实体 |
| 匿名性 ||||
| 交易速度 ||||

[blockchain-demo](https://github.com/anders94/blockchain-demo)

### hash算法

特点:
- 从hash值不可以反向推导出原始的数据
- 输入数据的微小变化会得到完全不同的hash值
- 相同的数据会得到相同的值
- 执行效率要高效,长的文本也能快速地计算出哈希值
- hash算法的冲突概率要小

### 区块

> 一般以 `0000`开头
`第n块的Hash值 = Hash(第n-1块的Hash值 + 第n块的账本数据)`

0号区块前指针是以 0 组成的字符串

### P2P网络

链上每一台电脑都是一个节点,都是客户端,也都是服务器,组成P2P网络

### 记账和挖矿

比特币采用POW(工作量证明)来选择使用谁的账本

### 共识机制

广泛应用的共识机制

- POW(工作量证明机制):比特币
- POS(权益证明机制):以太坊
- POA(权威证明机制):结合了pow和pos
- POC(容量证明机制):Chia
- CPOC(有条件的容量证明机制) :结合了poc和pos

## 比特币

Cypherpunk(密码朋克) 中本聪

## 以太坊

维塔利克·布特林(Vitalik Buterin),以太坊发明人。

### 以太币

以太坊区块链上的代币称为以太币(Ether),代码为 ETH。

作用:

- 质押挖矿
- 发布合约
- 交易
- 投资

单位:

| 单位 | Wei 值 | Wei |
| :--------: | :------: | :-----------------------: |
| wei | 1 wei | 1 |
| Kwei | 1e3 wei | 1,000 |
| Mwei | 1e6 wei | 1,000,000 |
| Gwei | 1e9 wei | 1,000,000,000 |
| microEther | 1e12 wei | 1,000,000,000,000 |
| milliEther | 1e15 wei | 1,000,000,000,000,000 |
| Ether | 1e18 wei | 1,000,000,000,000,000,000 |

如何获取以太币?
主网:
![img](https://cdn.jsdelivr.net/gh/HarryPoint/oss@main/uPic/2024-07-13_00:29:43_7CCOZp.png)

测试网:

- Goerli 官网:https://goerli.net/
- Sepolia 官网:https://sepolia.dev/

### 以太网

当前应用:

- [谜恋猫](https://www.cryptokitties.co) 虚拟猫咪休闲游戏
- [opensea](https://opensea.io) NFT交易龙头
- [uniswap](https://uniswap.org) 去中心化的DeFi交易所
- [Dao botto](https://botto.com) 去中心化的自治组织

## 以太坊-钱包

> 钱包只存账户信息,资产在链上
区块链钱包分类:热钱包(Hot Wallet)、冷钱包(Cold Wallet)

概念内容:密码、私钥、公钥、keystore、助记词

![img](https://cdn.jsdelivr.net/gh/HarryPoint/oss@main/uPic/2024-07-13_00:50:30_0JbQgC.png)

挖矿地址:

- 以太坊: https://www.tokenpocket.pro/
- 测试网(goerli): https://goerli-faucet.pk910.de/

## 以太坊-智能合约

### DApp

web3书籍推荐
![img](https://cdn.jsdelivr.net/gh/HarryPoint/oss@main/uPic/2024-07-13_02:09:29_b53ADe.png)

0 comments on commit 67aeb91

Please sign in to comment.