'Blockchain and Cryptocurrency' Subject @ Korea University, 2021
01. Syllabus
02. Blockchain Overview and Introduction - Technical Concepts of Blockchain Systems -
03. Blockchain's Theoretical Foundation, Cryptography
04. Bitcoin and Nakamoto Blockchain
05. Ethereum and Smart Contract
06. NFT and Metaverse
07. Cardano(ADA) and Other Altcoins
08. Dark Coins
09. Blockchain Usage Beyond Currency - Way to Design Good Blockchain Business Models -
4. 고려대학교정보보호대학원
마스터 제목 스타일 편집
Ethereum (2013)
러시아 출신 캐나다人, 비탈릭 부테린
(Vitalik Buterin)
17살 때 컴퓨터 프로그래머인 아버지에게
처음 비트코인에 대한 이야기를 듣고,
19살이 되던 2013년 이더리움 설계도를
발간, 2015년 이더리움 공개.
올해 27세에 불과한 비탈릭 부테린의
재산은 10억 달러로 최연소 억만장자라고
미국의 포브스는 추산했음.
4
5. 고려대학교정보보호대학원
마스터 제목 스타일 편집
Ethereum (2013)
부테린은 블록체인기술 자체에 관심을
가짐.
블록체인에 암호화폐 거래 기록만 저장하지
말고 ‘거래 기록 + 소프트웨어’도 저장하자는
아이디어를 냄. (= Distributed Turing
Machine with Blockchain Protection)
Distributed Turing Machine : A smart contract
program is executed by a network of miners who
reach consensus on the outcome of the
execution,
Turing Machine with Blockchain Protection :
and update the contract’s state on the
blockchain accordingly.
5
6. 고려대학교정보보호대학원
마스터 제목 스타일 편집
6
1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+ 10
연말정산 프로그램
Ethereum (2013)
9. 고려대학교정보보호대학원
마스터 제목 스타일 편집
1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+ 10
연말정산 프로그램
9
Ethereum (2013)
10. 고려대학교정보보호대학원
마스터 제목 스타일 편집
[참고] Smart Contracts (1996)
10
Nick Szabo suggested encoding
the contractual terms and
protocols of the involved parties
in the digital form!
12. 고려대학교정보보호대학원
마스터 제목 스타일 편집
(Sarwar Sayeed, "Smart Contract: Attacks and Protections", IEEE Access 2020)
12
Ethereum (2013)
13. 고려대학교정보보호대학원
마스터 제목 스타일 편집
(Sarwar Sayeed, "Smart Contract: Attacks and Protections", IEEE Access 2020)
13
Ethereum (2013)
14. 고려대학교정보보호대학원
마스터 제목 스타일 편집
Ethereum in Detail
14
(https://bytescout.com/blog/ethereum-turing-blockchain.html)
15. 고려대학교정보보호대학원
마스터 제목 스타일 편집
(very similar to Javascript)
(Ethereum VM is Turing-complete)
(Note : Bitcoin has a ad-hoc, non-Turing-complete stack-based
scripting language with fewer than 200 commands called 'opcodes'.)
Solidity
(very similar to Javascript)
Ethereum Bytecodes
Ethereum VM
(Ethereum VM is Turing-complete)
compiles to
executed by
15
[참고] EVM & Turing-complete
19. 고려대학교정보보호대학원
마스터 제목 스타일 편집
[참고] Bitcoin vs. Ethereum Transaction
19
UTXO(Unspent Transaction Output)-based Model : (e.g.) Bitcoin
Account-based Model : (e.g.) Ethereum
25. 고려대학교정보보호대학원
마스터 제목 스타일 편집
By 액시엄 젠(Axiom Zen) (2017년)
출시 이후 1만 달러 이상의 고양이가 100
마리 이상 거래됐고, 경제 규모는 4천만 달
러에 달했음.
심지어 몇몇 이용자들은 10만 달러 이상의
고양이를 거래하기도 함.
출시 이후 크립토키티의 거래량이 이더리
움 네트워크 트래픽의 약 25%를 차지하기
도 함 ⇒ 네트워크 처리 속도 해결이 관건.
25
탈중앙화 된 앱 (DApp) : CryptoKitties
26. 고려대학교정보보호대학원
마스터 제목 스타일 편집
다른 블록체인 프로젝트와 달리 ICO를 통
해 투자금을 모으지 않고 지속가능한 수익
모델을 개발했다는 점에서 주목됨.
26
“The next big thing always starts out being dismissed as a toy”
혁신은 언제나 장난감이란 오해와 함께 시작된다
CHris Dixon, A16z Partner
탈중앙화 된 앱 (DApp) : CryptoKitties
36. 고려대학교정보보호대학원
마스터 제목 스타일 편집
Currency and Issuance
이더리움(Ethereum) 네트워크는 그
안에서 자체적으로 통용되는,
‘이더(Ether)’라는 화폐를 가지고 있음.
비트코인과는 달리 매년 일정량을 신규
발행함.
매년 신규 발행량이 일정함에도 불구하고, 발
행된 총 이더에 대한 신규 이더의 발행 비율은
그 비중이 0을 향해 계속 줄어들게 됨.
36
37. 고려대학교정보보호대학원
마스터 제목 스타일 편집
Currency and Issuance
매년 일정량을 신규 발행하는 이유
정해진 양의 이더를 영구적으로 신규 발행하
는 모델(permanent linear supply growth
model)은 비트코인이 겪고 있는 ‘부의 집중
현상’을 완화시킬 수 있음.
또한 현재 또는 미래의 참여자들이 계속해서
이더를 시장이 아닌 채굴을 통해 얻을 수 있는
기회를 제공함.
37
38. 고려대학교정보보호대학원
마스터 제목 스타일 편집
Currency and Issuance
매년 일정량을 신규 발행하는 이유
시간이 흐름에 따라 사용자들의 부주의, 죽음
등으로 인해 현실적으로 일부의 이더들이 계
속해서 시장에서 사라지게 됨. 이렇게 사라지
는 이더로 인해 점점 줄어드는 ‘시장유통가능
이더 총량(the total currency supply in
circulation)’은 매년 신규 발행되는 이더에 의
해 균형을 이루게 됨.
38
40. 고려대학교정보보호대학원
마스터 제목 스타일 편집
Greedy Heaviest Observed Subtree (from
Secure High-Rate Transaction Processing
in Bitcoin)
Bitcoin 채굴 : 10분/1블록
→ Ethereum 채굴 : 15초/1블록
더 빠른 트랜잭션 처리가 가능함. 그러나 경쟁
상태의 블록이 더 많이 생기는 단점이 있음.
Why Do We Need Ethereum GHOST?
40
41. 고려대학교정보보호대학원
마스터 제목 스타일 편집
기존 빠른 확인시간(confirmation times)을
갖는 블록체인들의 문제점
1. 높은 스테일(stale) 비율로 인한 보안성 저하
문제
2. 중앙집중화(centralization) 문제
41
Why Do We Need Ethereum GHOST?
Securing the network by making the chain "heavier"!
42. 고려대학교정보보호대학원
마스터 제목 스타일 편집
GHOST는 어느 체인이 “가장 긴(longest)”
것인지 계산할 때 스테일(stale) 블록도
포함시킴으로써 앞에서 제기한 첫번째
이슈, 즉 네트워크 보안 손실이라는
문제를 해결함.
또한 중앙화라는 두번째 문제를 해결하기
위해, 스테일 블록들에 대해서도 블록보상
을 제공함.
42
Ethereum GHOST (2013)
44. 고려대학교정보보호대학원
마스터 제목 스타일 편집
44
총 12개
Subtree의 노드 개수 : 총 6개
총 4개
총 5개
총 2개
(Source: Yonatan Sompolinsky, "Secure High-Rate Transaction Processing in Bitcoin“)
A block tree in which the longest chain and the chain selected by GHOST differ. An
attacker's chain is able to switch the longest chain, but not the one selected by
GHOST.
[참고] Longest Chain Selection by GHOST
45. 고려대학교정보보호대학원
마스터 제목 스타일 편집
7단계까지만 포함하는 단순화된 GHOST
하나의 블록은 반드시 하나의 모블록을 지정해야 하
며, 0개 또는 그 이상의 삼촌을 지정(confirm)해야 한
다. (현재 2개까지 지원)
블록 B에 포함된 삼촌은 다음과 같은 속성들을 가지
고 있어야 한다.
B의 k번째 조상의 직접적인 자손이어야 한다. 단, 2 ≤ k ≤ 7.
B의 조상이어서는 안된다.
유효한 블록 헤더여야 하지만, 이전에 확인되었을 필요도, 또
는 심지어 유효한 블록일 필요도 없다.
이전 블록들에 포함된 모든 삼촌들, 그리고 같은 블록에 포함
된 모든 다른 삼촌들과는 달라야 한다 (중복포함방지).
블록 B에 있는 각 삼촌 U에 대해, B의 채굴자는 코인
베이스 보상에 더해 추가로 3.125%를 더 받고, U의
채굴자는 기본 코인베이스 보상의 93.75%를 받는다.
45
Ethereum GHOST (2013)
46. 고려대학교정보보호대학원
마스터 제목 스타일 편집
Issues Unsolved by GHOST Alone :
First, miners that are better connected to
the network enjoy rewards slightly larger
than their share of the hashing power, and
Second, the selfish mining strategy explored
by Eyal and Sirer can be employed by
weaker miners.
[참고] Unsolved Issues
46
48. 고려대학교정보보호대학원
마스터 제목 스타일 편집
Casper the Friendly Finality Gadget is the
phase 1 deployment of proof of stake on
Ethereum. It adds :
PoS, layered on top of PoW
Finality every 50 blocks [one epoch]
51% attack resistance
Reduction in energy waste from PoW
In later iterations, PoW will be replaced
completely.
48
Ethereum Casper
49. 고려대학교정보보호대학원
마스터 제목 스타일 편집
Any ETH holder can become a validator
by simply depositing ETH into the
Casper smart contract.
The Casper incentive logic lives in a
smart contract!
Why Deposits?
Gives us larger incentives to work with
Impose larger economic penalties to
bad actors ⇒ “Slashing”
49
Ethereum Casper
50. 고려대학교정보보호대학원
마스터 제목 스타일 편집
PoW (Proof of Work)
"one CPU, one vote“
Randomness comes from brute force
guessing of nonce.
PoS (Proof of Stake a.k.a. Consensus by
Bet)
"One coin, one vote“
Random miner selected with probability
proportional to wealth rather than
computational power.
Randomness comes from the protocol itself.
[참고] PoS (Proof of Stake)
50
56. 고려대학교정보보호대학원
마스터 제목 스타일 편집
56
Vote (for Link(Edge))
Ethereum Casper FFG in Detail
(Source: Aditya Asgaonkar, "Casper FFG Explainer", adiasg.me)
checkpoint
checkpoint
checkpoint
Epoch
Epoch
57. 고려대학교정보보호대학원
마스터 제목 스타일 편집
57
Justification
& Finalization
Ethereum Casper FFG in Detail
(Source: Aditya Asgaonkar, "Casper FFG Explainer", adiasg.me)
checkpoint
checkpoint
checkpoint
checkpoint
checkpoint
Supermajority
Link :
Supermajority
Link :
A is justified
58. 고려대학교정보보호대학원
마스터 제목 스타일 편집
58
Justification
& Finalization
Ethereum Casper FFG in Detail
(Source: Aditya Asgaonkar, "Casper FFG Explainer", adiasg.me)
checkpoint
checkpoint
checkpoint
checkpoint
checkpoint
Supermajority
Link :
Supermajority
Link :
A is justified
59. 고려대학교정보보호대학원
마스터 제목 스타일 편집
59
Justification
& Finalization
Ethereum Casper FFG in Detail
(Source: Aditya Asgaonkar, "Casper FFG Explainer", adiasg.me)
Direct Child of B
checkpoint
checkpoint
checkpoint
checkpoint
Supermajority
Link :
Supermajority
Link :
60. 고려대학교정보보호대학원
마스터 제목 스타일 편집
60
Justification
& Finalization
Ethereum Casper FFG in Detail
(Source: Aditya Asgaonkar, "Casper FFG Explainer", adiasg.me)
Direct Child of B
checkpoint
checkpoint
checkpoint
checkpoint
Supermajority
Link :
Supermajority
Link :
61. 고려대학교정보보호대학원
마스터 제목 스타일 편집
Casper FFG paper mandates two slashing
conditions which provides accountable
safety :
Rule ⑴ : No double vote
Rule ⑵ : No surround vote
61
Ethereum Casper FFG in Detail
62. 고려대학교정보보호대학원
마스터 제목 스타일 편집
62
Slashing Rules ⑴ : No Double Vote
Ethereum Casper FFG in Detail
height(T1) = height(T2)
(Source: Aditya Asgaonkar, "Casper FFG Explainer", adiasg.me)
checkpoint
checkpoint checkpoint
checkpoint checkpoint
Vote(S1,T1)
Vote(S1,T2)
64. 고려대학교정보보호대학원
마스터 제목 스타일 편집
Safety & Liveness
Accountable Safety : If two conflicting
blocks are finalized, then at least ⅓rd
validators have broken the Casper FFG rules,
and these validators can be identified (by
checking the signature on votes).
Plausible Liveness : In any state of the
protocol, there is some set of votes that
validators can make to finalize a new block
without violating any Casper FFG rules (if
there exist children extending the finalized
chain).
64
Ethereum Casper FFG in Detail
65. 고려대학교정보보호대학원
마스터 제목 스타일 편집
Two slashing conditions ⇒ Accountable
safety
Correct-by-construction fork choice rule ⇒
Plausible liveness
“Always choose the longest chain on top of the
highest-epoch-number justified checkpoint.”
Dynamic validator sets
Extensions :
Not reverting finalized checkpoints
Withdraw delay
Inactivity leak
65
Ethereum Casper FFG in Summary
67. 고려대학교정보보호대학원
마스터 제목 스타일 편집
67
(Feb 23, 2018)
(N.Atzei et al., "A Survey of Attacks on Ethereum Smart Contracts (SoK)", ICPST 2017)
이더리움 보안 – Smart Contract –
68. 고려대학교정보보호대학원
마스터 제목 스타일 편집
(Murat, "Modeling the DAO(Decentralized Autonomous Organization) attack in PlusCal", Jan 26, 2018)
무한 환불!
68
이더리움 보안 – Smart Contract –
69. 고려대학교정보보호대학원
마스터 제목 스타일 편집
Decentralized Autonomous Organization (
탈중앙화 된 자율조직)
처음에는 비트코인이 사상 최초의 완전한 기
능을 갖춘 DAO로 간주되었음.
사전 프로그램 된 일련의 규칙을 갖추고 있고,
자율적으로 기능하며, 분산 합의 프로토콜을 통해
조정되기 때문.
이후 이더리움 플랫폼에서 스마트 컨트랙트
를 사용할 수 있게 되면서 DAO의 생성은 일
반 대중에게 보다 가까워졌으며 현재의 모습
을 갖추게 됨.
69
[참고] DAO
70. 고려대학교정보보호대학원
마스터 제목 스타일 편집
작동 순서
1. 지켜야 할 일련의 규칙들을 스마트
컨트랙트로 만듦.
2. 자금 조달 : 사용자는 DAO에 투자함으로써
투표권을 갖게 되며, 이를 통해 DAO의 운영
방식에 영향을 미칠 수 있게 됨.
3. 자금조달 기간이 끝나고 DAO가 가동되면 그
자금의 사용처와 방법에 대한 모든 결정은
중개자 없이 합의를 통해 이루어짐.
※ DAO는 오픈 소스이므로 그 코드는 누구라도
볼 수 있음. 게다가 모든 규칙과 금융 거래는
블록체인에 기록됨.
70
[참고] DAO
71. 고려대학교정보보호대학원
마스터 제목 스타일 편집
Immutable Bugs
Problem : All the source code of smart
contracts, including those containing
bugs, are immutable once they are
mined and added to the blockchain.
Solution : It will not be possible to patch it,
but would be possible to "destroy" the
smart contract (marking it as unusable) so
that it cannot be executed.
They can be blocked by calling a destructor
function.
71
이더리움 보안 – Smart Contract –
72. 고려대학교정보보호대학원
마스터 제목 스타일 편집
Random Numbers
Problem : The execution of the EVM
code is deterministic. This means that
the code executed with the same
inputs must produce the same output
in all the nodes that execute it. This
presents a problem when generating
random numbers.
Solution : To simulate randomness, many
contracts use a random number generator
initialized with the same seed for all miners.
72
이더리움 보안 – Smart Contract –
73. 고려대학교정보보호대학원
마스터 제목 스타일 편집
73
(A.L.Vivar et al., "Smart Contracts: A Review of Security Threats Alongside an Analysis of Existing Solutions", Entropy 2020)
이더리움 보안 – Smart Contract –
74. 고려대학교정보보호대학원
마스터 제목 스타일 편집
“Surprisingly, even for a very simple smart contract it is
difficult to create it correctly!”
74
이더리움 보안 – Smart Contract –
75. 고려대학교정보보호대학원
마스터 제목 스타일 편집
이더리움 네트워크 확장성 문제 : 트랜잭션이
폭증 → 처리 속도가 느려짐 → 디파이 사용
자들은 다른 경쟁자들보다 좀 더 먼저 자신의
트랜잭션을 처리하게 하려고 가스비를 올림
→ 전송 수수료가 지나치게 비싸짐.
이더리움 진영에서는 지난 2017년부터 이러한 확
장성 문제 개선을 위한 여러 실험을 계속해 오고
있음.
Layer 1 scaling : Upgrading the blockchain
themselves modifying the base layer.
Layer 2 scaling : Building things on the top of
existing systems. Not changing the underlying
system. (e.g.) Sidechain Plasma
75
이더리움 확장성 문제
76. 고려대학교정보보호대학원
마스터 제목 스타일 편집
프로그램 코드(스마트 컨트랙트)가 수많은
법 조항들을 상세하게 표현해 내는 것이
가능한가?
‘리카르디안 컨트랙트(Ricardian Contract)’는
아직 미완성.
인터넷상에서의 법적 관할권 문제
76
이더리움 구현 가능성과 법적 효력 문제
77. 고려대학교정보보호대학원
마스터 제목 스타일 편집
77
(Diederick Cardon, "Ricardian contracts - legally binding agreements on the blockchain", 2017)
78. 고려대학교정보보호대학원
마스터 제목 스타일 편집
78
(Blockchain Simplified, "Smart Contracts on Blockchain vs Ricardian Contracts")
84. 고려대학교정보보호대학원
마스터 제목 스타일 편집
DB Sharding (L1)
(Image Source: Dzone)
각각의 샤드가 데이터를 병렬처리하는 것이 가능함!
84
85. 고려대학교정보보호대학원
마스터 제목 스타일 편집
[참고] Comparison of Sharding (L1)
85
(A.Hafid et al., "Scaling Blockchains: A Comprehensive Survey", IEEE Access 2020)
86. 고려대학교정보보호대학원
마스터 제목 스타일 편집
[참고] Single Shard Takeover Attack
(A.Hafid et al., "Scaling Blockchains: A Comprehensive Survey", IEEE Access 2020)
86
(A.Hafid et al., "Scaling Blockchains: A Comprehensive Survey", IEEE Access 2020)
87. 고려대학교정보보호대학원
마스터 제목 스타일 편집
Directed Acyclic Graph (DAG) (L1)
87
(A.Hafid et al., "Scaling Blockchains: A Comprehensive Survey", IEEE Access 2020)
(e.g.) Spectre, IOTA, Phanton, DLattice, CoDAG, Nano, and XDAG
91. 고려대학교정보보호대학원
마스터 제목 스타일 편집
Proposed by Joseph Poon and Vitalik
Buterin in 2017.
Plasma aims at extending the concept of
sidechains, as a way to reduce the number
of transactions to be processed by the L1
blockchain, also going to reduce
transaction latency and cost.
Consensus mechanisms exploited in Plasma
are usually less decentralized than L1, in
order to achieve better performance.
Security is achieved through merkle root
commitments (a.k.a. periodic checkpoint
commitments.) to L1.
91
Plasma (2017) (L2)
97. 고려대학교정보보호대학원
마스터 제목 스타일 편집
Payment channels and Plasma are usually
considered “full” Layer 2 solutions, while
Rollups, a framework for Ethereum
proposed in 2018, is considered a “hybrid”
solution between L1 and L2 scaling.
This is due to the fact that, while Lightning
Network and Plasma summarize many
state transitions in one single
commitment or channel closing,
The Rollup reports on the L1 blockchain a
summary of every single transaction
performed L2 off-chain
97
Rollups (2018) (L1/L2 Hybrid)
101. 고려대학교정보보호대학원
마스터 제목 스타일 편집
101
Comparison of L1/L2 Scaling Solutions
(A.Hafid et al., "Scaling Blockchains: A Comprehensive Survey", IEEE Access 2020)