KIT – University of the State of Baden-Wuerttemberg and
National Research Center of the Helmholtz Association www.kit.edu
Trading Stocks on Blocks
The Quality of Decentralized Markets
Benedikt Notheisen
FinteQC, June 20 – June 21, 2018, Lévis
2
Central Blockchain Features
[Nakamoto, 2008; Lamport et al., 1982; Szabo, 1997; Xu et al., 2016; Notheisen et al., 2017b]
Distributed database
Decentralized
consensus mechanism
Cryptographic security
Trading Stocks on Blocks | Benedikt Notheisen
3
Central Blockchain Features
&
[Nakamoto, 2008; Lamport et al., 1982; Szabo, 1997; Xu et al., 2016; Notheisen et al., 2017b]
Smart contract = code executed
within the distributed network
Complexity
Contractual
agreements
Autonomous
agents
Full scale
software
Computing power
Distributed database
Decentralized
consensus mechanism
Cryptographic security
Trading Stocks on Blocks | Benedikt Notheisen
4
Motivation
Trading Stocks on Blocks | Benedikt Notheisen
Transacting complex assets on a blockchain-system is easy – but what
about real decentralization?
Full
disintermediation
Spontaneous
markets
Cost savings?
 Resilient and intermediary-free market platform to trade complex real world assets
 Resolution of inefficiencies in low-volume OTC-markets [Duffie et al., 2005]
 Alternative VC-mechanism [Jenztsch, 2015]
[Notheisen et al. 2017a]
5
Some Practical Examples
Trading Stocks on Blocks | Benedikt Notheisen
https://github.com/etherex
https://www.raidex.io/
https://www.shar
evest.co/
https://goo.g
l/WbG1W7
https://www.
augur.net/
6
Trading Stocks on Blocks – System Design
Trading Stocks on Blocks | Benedikt Notheisen
<<struct>>
Local Balance
<<struct>>
Market
<<struct>>
OrderID
<<struct>>
Order
<<contract>>
TokenStandard
------------------------------------
Var.
------------------------------------
+ total supply ( ): void
+ transfer ( ): boolean
+ approve ( ): boolean
+ allowance ( ): unint256
<<contract>>
DSX
----------------------------------
Var.
----------------------------------
+ registerToken ( ): void
+ buy ( ): void
+ sell ( ): void
- SaveOrder ( ) void
- Match ( ): void
0…n
0…n
0…n
0…n
0…n
0…n
1
1
1
1
1
1
Features
• Intermediary-free design
• Complex assets
• Convenience features
• Matching followed by joint
clearing, and settlement
Market mechanism
• Continuous double auction
• Limit Order Books
• Price-time-precedence
Performance
• # Tx: 2 / sec (24 / block)
• Cost: 90 * 10-6 EUR
(0.2 Mio. / 4.7 Mio gas)
• Latency: 12 sec
• Stale rate: 50%
• Block size 1.5 KB
[Notheisen et al. 2017a]
7
Trading Stocks on Blocks – System Design
Trading Stocks on Blocks | Benedikt Notheisen
Features
• Intermediary-free design
• Complex assets
• Convenience features
• Matching followed by joint
clearing, and settlement
Market mechanism
• Continuous double auction
• Limit Order Books
• Price-time-precedence
Performance
• # Tx: 2 / sec (24 / block)
• Cost: 90 * 10-6 EUR
(0.2 Mio. / 4.7 Mio gas)
• Latency: 12 sec
• Stale rate: 50%
• Block size 1.5 KB
[Notheisen et al. 2017a]
<<struct>>
Local Balance
<<struct>>
Market
<<struct>>
OrderID
<<struct>>
Order
<<contract>>
TokenStandard
------------------------------------
Var.
------------------------------------
+ total supply ( ): void
+ transfer ( ): boolean
+ approve ( ): boolean
+ allowance ( ): unint256
<<contract>>
DSX
----------------------------------
Var.
----------------------------------
+ registerToken ( ): void
+ buy ( ): void
+ sell ( ): void
- SaveOrder ( ) void
- Match ( ): void
0…n
0…n
0…n
0…n
0…n
0…n
1
1
1
1
1
1
8
Trading Stocks on Blocks – System Design
Trading Stocks on Blocks | Benedikt Notheisen
Features
• Intermediary-free design
• Complex assets
• Convenience features
• Matching followed by joint
clearing, and settlement
Market mechanism
• Continuous double auction
• Limit Order Books
• Price-time-precedence
Performance
• # Tx: 2 / sec (24 / block)
• Cost: 90 * 10-6 EUR
(0.2 Mio. / 4.7 Mio gas)
• Latency: 12 sec
• Stale rate: 50%
• Block size 1.5 KB
[Notheisen et al. 2017a]
<<struct>>
Local Balance
<<struct>>
Market
<<struct>>
OrderID
<<struct>>
Order
<<contract>>
TokenStandard
------------------------------------
Var.
------------------------------------
+ total supply ( ): void
+ transfer ( ): boolean
+ approve ( ): boolean
+ allowance ( ): unint256
<<contract>>
DSX
----------------------------------
Var.
----------------------------------
+ registerToken ( ): void
+ buy ( ): void
+ sell ( ): void
- SaveOrder ( ) void
- Match ( ): void
0…n
0…n
0…n
0…n
0…n
0…n
1
1
1
1
1
1
9
Trading Stocks on Blocks – System Design
Trading Stocks on Blocks | Benedikt Notheisen
Features
• Intermediary-free design
• Complex assets
• Convenience features
• Matching followed by joint
clearing, and settlement
Market mechanism
• Continuous double auction
• Limit Order Books
• Price-time-precedence
Performance
• # Tx: 2 / sec (24 / block)
• Cost: 90 * 10-6 EUR
(0.2 Mio. / 4.7 Mio gas)
• Latency: 12 sec
• Stale rate: 50%
• Block size 1.5 KB
[Notheisen et al. 2017a]
<<struct>>
Local Balance
<<struct>>
Market
<<struct>>
OrderID
<<struct>>
Order
<<contract>>
TokenStandard
------------------------------------
Var.
------------------------------------
+ total supply ( ): void
+ transfer ( ): boolean
+ approve ( ): boolean
+ allowance ( ): unint256
<<contract>>
DSX
----------------------------------
Var.
----------------------------------
+ registerToken ( ): void
+ buy ( ): void
+ sell ( ): void
- SaveOrder ( ) void
- Match ( ): void
0…n
0…n
0…n
0…n
0…n
0…n
1
1
1
1
1
1
10
Research Question & Research Focus
Trading Stocks on Blocks | Benedikt Notheisen
Evaluation of..
 … the potential of intermediary-free market setups and
 … the quality of decentralized markets in general.
Identification of…
 … impeding factors and
 … trade-offs between design parameters.
Derivation of…
 … a quantitative quality performance relationship and
 … design principles for decentralized markets.
How do different design parameters that determine the performance of
blockchain-based markets impact market quality?
Simulation of a
decentralized market based
on actual trading data
11
Research Framework
Trading Stocks on Blocks | Benedikt Notheisen
Technology
Competition
Regulation
Business
Structure
Customers
Products
IT-
Systems
Trading
System
Degree of
Automation
Market
Microstructure
Execution
System
Transparency
[Zhang et al., 2011]
12
Research Framework
Trading Stocks on Blocks | Benedikt Notheisen
Technology
Competition
Regulation
Business
Structure
Customers
Products
IT-
Systems
Trading
System
Degree of
Automation
Market
Microstructure
Execution
System
Transparency
Market Quality Measures
Activity
Trading
Intensity
Market
Activity
Liquidity
Spread
Measures
Depth
Information
Price Impact
Permanent
Information
Impact
[Zhang et al., 2011]
13
Research Framework
Trading Stocks on Blocks | Benedikt Notheisen
Technology
Competition
Regulation
Business
Structure
Customers
Products
IT-
Systems
Trading
System
Degree of
Automation
Market
Microstructure
Execution
System
Transparency
Market Quality Measures
Activity
Trading
Intensity
Market
Activity
Liquidity
Spread
Measures
Depth
Information
Price Impact
Permanent
Information
Impact
[Zhang et al., 2011]
14
Research Framework – Related Literature
Trading Stocks on Blocks | Benedikt Notheisen
Spread measures emerge from the idea that spreads result from
direct transaction costs which need to be covered by dealers.
[Hasbrouck, 1991]
Price discovery can be defined as the process by which new
information is incorporated into security prices.
[Hasbrouck, 1991]
The price discovery for the DJIA stocks occurs at the exchange
with the largest market share (reference market, NYSE).
Xetra as reference market in Germany.
[Hasbrouck, 1995; Clapham and Zimmerman, 2016]
Frequent batch auctions provide initial implications for
blockchain-based matching (greater price efficiency, higher
information costs for traders, design response HFTs).
Maximum market quality prevails at intermediate intervals of a
few seconds.
[Madhavan, 2992; Budish et al., 2014; Budish et al., 2015; Fricke and Gerig, 2016]
Measurement of market quality
The quality of blockchain-based
markets depends on…
Matching intervals
(block creation time)
Batch size
(block size)
15
Technology
Competition
Regulation
Market Quality Measures
Research Framework – Liquidity Measures
Trading Stocks on Blocks | Benedikt Notheisen
Business
Structure
Customers
Products
IT-
Systems
Trading
System
Degree of
Automation
Market
Microstructure
Execution
System
Transparency
Activity
Trading
Intensity
Market
Activity
Liquidity
Spread
Measures
Depth
Information
Price Impact
Permanent
Information
Impact
[Zhang et al., 2011]
Liquidity Measures
• Quoted Spread i, t =
Ask i,t −Bid i,t
2∗Mid i,t
• Effective Spread i, t = Di, t ∗
Price i,t −Mid i,t
Mid i,t
• Realized Spread i, t = Di, t ∗
Price i,t −Mid i,t+x
Mid i,t
• Amihud Illiquidity i, t =
1
dt
σt=1
dt
|Return i,t|
Price i,t ∗
Volume i,t
Information Measure
• Price Impact i, t = Di, t ∗
Mid i,t+x−Mid i,t
Mid i,t
16
Summary Statistics – Data Sample
Trading Stocks on Blocks | Benedikt Notheisen
2013 2014 2015 2016 2017 Total Period
Total Submissions 439,506 331,617 522,349 334,701 254,970 1,883,143
Total Executions 308,816 257,818 400,487 265,348 208,253 1,440,722
Total Trading Volume 4,942,959,500 4,503,355,973 7,492,697,871 4,184,648,839 3,861,366,320 24,985,028,503
Trading Days 253 252 253 237 236 1,231
Submissions per Day
Average 1,737.18 1,315.94 2,064.62 1,412.24 1,080.38 1,529.77
Median 1,656.00 1,207.00 1,618.00 1,305.00 998.00 1,334.00
Standard Deviation 502.74 489.05 1,318.86 847.53 362.80 859.30
Executions per Day
Average 1,220.62 1,023.09 1,582.95 1,119.61 882.43 1,170.37
Median 1,158.00 929.50 1,255.00 1,017.00 823.00 1,014.00
Standard Deviation 353.60 400.17 1,006.99 700.09 314.46 659.82
Trading Volume per Day
Average 19,537,389 17,870,460 29,615,407 17,656,746 16,361,722 20,296,530
Median 18,100,014 16,655,422 20,967,750 16,251,023 15,409,822 17,101,315
Standard Deviation 6,664,402 7,746,418 21,575,427 9,604,725 6,451,717 12,878,994
Shares per Trade
Average 579.60 566.67 493.94 558.25 589.43 550.96
Median 200.00 160.00 135.00 150.00 150.00 150.00
Standard Deviation 1,963.00 1,728.18 1,471.44 1,890.38 1,756.00 1,751.43
Year
Sample Characteristics
January 2013 to
December 2017
DAX 30 – German
Blue Chips
(index composition as of
December 31, 2017)
Time-stamped order-level data
 order type and limits
 price and quantity
 enterparty ID
17
Summary Statistics – Trade Volume
Trading Stocks on Blocks | Benedikt Notheisen
Stock Group → High Trade Medium Trade Low Trade
Node Group ↓ Volume Volume Volume
Very High Trade 14,621.38 5,247.27 1,695.77 21,564.42
Volume 58.52% 21.00% 6.79% 86.31%
High Trade 1,777.48 725.37 280.59 2,783.44
Volume 7.11% 2.90% 1.12% 11.14%
Medium Trade 326.81 125.17 66.69 518.67
Volume 1.31% 0.50% 0.27% 2.08%
Low Trade 69.48 30.04 13.82 113.34
Volume 0.28% 0.12% 0.06% 0.45%
Very Low Trade 2.33 1.66 1.16 5.15
Volume 0.01% 0.01% 0.00% 0.02%
16,797.49 6,129.51 2,058.03 24,985.03
67.23% 24.53% 8.24% 100.00%
Sum
Sum
Trade volume in millions of EUR
18
Simulation Model
Trading Stocks on Blocks | Benedikt Notheisen
Parameters of Simulation Scenarios
Block Size
Block Creation Time
Simulation
input
Raw order data
Simulated Matching Engine
Based on the trading rules of the
Stuttgart stock exchange
https://www.boerse-stuttgart.de/en/company/all-
about-trading/rules-and-regulations/
Executions
Simulation
output
Analysis
• Market quality simulated vs. actual market (Stuttgart stock exchange)
• Simulation scenarios are designed to quantify the impact blockchain
parameters variations on market quality
19
Simulation Scenarios
Block Size
Low Medium High
BlockCreationTime
𝑡 𝑛𝑜𝑟𝑚𝑎𝑙
∗
[Fricke and Gerig, 2016]
10 sec / 10 orders 10 sec / 100 orders 10 sec / 1,000 orders
𝑡 𝑝𝑒𝑎𝑘
∗
[Fricke and Gerig, 2016]
5 sec / 10 orders 5 sec / 100 orders 5 sec / 1,000 orders
Low 12 sec / 24 orders 12 sec / 200 orders 12 sec / 1,000 orders
Medium 1 min / 24 orders 1 min / 100 orders 1 min / 1,000 orders
High 10 min / 24 orders 10 min / 100 orders 10 min / 1,000 orders
Trading Stocks on Blocks | Benedikt Notheisen
20
Simulation Scenarios
Block Size
Low Medium High
BlockCreationTime
𝑡 𝑛𝑜𝑟𝑚𝑎𝑙
∗
[Fricke and Gerig, 2016]
10 sec / 10 orders 10 sec / 100 orders 10 sec / 1,000 orders
𝑡 𝑝𝑒𝑎𝑘
∗
[Fricke and Gerig, 2016]
5 sec / 10 orders 5 sec / 100 orders 5 sec / 1,000 orders
Low 12 sec / 24 orders 12 sec / 200 orders 12 sec / 1,000 orders
Medium 1 min / 24 orders 1 min / 100 orders 1 min / 1,000 orders
High 10 min / 24 orders 10 min / 100 orders 10 min / 1,000 orders
Trading Stocks on Blocks | Benedikt Notheisen
21
Simulation Scenarios
Block Size
Low Medium High
BlockCreationTime
𝑡 𝑛𝑜𝑟𝑚𝑎𝑙
∗
[Fricke and Gerig, 2016]
10 sec / 10 orders 10 sec / 100 orders 10 sec / 1,000 orders
𝑡 𝑝𝑒𝑎𝑘
∗
[Fricke and Gerig, 2016]
5 sec / 10 orders 5 sec / 100 orders 5 sec / 1,000 orders
Low 12 sec / 24 orders 12 sec / 200 orders 12 sec / 1,000 orders
Medium 1 min / 24 orders 1 min / 100 orders 1 min / 1,000 orders
High 10 min / 24 orders 10 min / 100 orders 10 min / 1,000 orders
Trading Stocks on Blocks | Benedikt Notheisen
22
Simulation Scenarios
Block Size
Low Medium High
BlockCreationTime
𝑡 𝑛𝑜𝑟𝑚𝑎𝑙
∗
[Fricke and Gerig, 2016]
10 sec / 10 orders 10 sec / 100 orders 10 sec / 1,000 orders
𝑡 𝑝𝑒𝑎𝑘
∗
[Fricke and Gerig, 2016]
5 sec / 10 orders 5 sec / 100 orders 5 sec / 1,000 orders
Low 12 sec / 24 orders 12 sec / 200 orders 12 sec / 1,000 orders
Medium 1 min / 24 orders 1 min / 100 orders 1 min / 1,000 orders
High 10 min / 24 orders 10 min / 100 orders 10 min / 1,000 orders
Trading Stocks on Blocks | Benedikt Notheisen
Exclusion of infeasible configurations based on minimum
standards for data security.
23
Empirical Strategy
Trading Stocks on Blocks | Benedikt Notheisen
Δ𝑄𝑢𝑎𝑙𝑖𝑡𝑦 = 𝛼 + 𝛽1 𝑠𝑖𝑧𝑒 + 𝛽2 𝑡𝑖𝑚𝑒 + 𝛽3 𝑠𝑖𝑧𝑒 ∗ 𝑡𝑖𝑚𝑒 + 𝛿 𝑔𝑟𝑜𝑢𝑝 + 𝛾 𝑐𝑜𝑛𝑡𝑟𝑜𝑙𝑠 + 𝜀
𝑄𝑢𝑎𝑙𝑖𝑡𝑦𝑆𝑖𝑚 − 𝑄𝑢𝑎𝑙𝑖𝑡𝑦 𝐸𝑥
Block size Block size creation
interaction
VolGroup,
NodeGroup,
Execution ratio
Simulation bias Block creation time
Interactions with
VolGroup & NodeGroup
Separate analysis for each
liquidity & information
measure
Specification of the
VolGroup and NodeGroup
dummies
Robustness, appropriate
controls, and empirical
details
24
Conclusion & Outlook
Trading Stocks on Blocks | Benedikt Notheisen
Significance to research and practice
Challenges and future research opportunities
Information propagation
throughout the network
Technological limitations
Strategic behavior of market
participants
Data from real-world
financial markets
Direct design
implications
Analysis
of performance-related
quality drivers
Technology-agnostic
evaluation
25
References
Trading Stocks on Blocks | Benedikt Notheisen
Budish, E., Cramton, P. and Shim, J. (2014), “Implementation Details for
Frequent Batch Auctions: Slowing Down Markets to the Blink of an Eye”,
American Economic Review, Vol. 104 No. 5, pp. 418–424.
Budish, E., Cramton, P. and Shim, J. (2015), “The High-Frequency Trading
Arms Race: Frequent Batch Auctions as a Market Design Response *”, The
Quarterly Journal of Economics, Vol. 130 No. 4, pp. 1547–1621.
Clapham, B. and Zimmermann, K. (2016), “Price discovery and convergence
in fragmented securities markets”, International Journal of Managerial Finance,
Vol. 12 No. 4, pp. 381–407.
Duffie, D., Gârleanu, N. and Pedersen, L.H. (2005), “Over‐the‐Counter
Markets”, Econometrica, Vol. 73 No. 6, pp. 1815–1847.
Fricke, D. and Gerig, A. (2018), “Too fast or too slow? Determining the
optimal speed of financial markets”, Quantitative Finance, Vol. 18 No. 4, pp. 519–
532.
Hasbrouck, J. (1991), “Measuring the Information Content of Stock Trades”,
The Journal of Finance, Vol. 46 No. 1, pp. 179–207.
Hasbrouck, J. (1995), “One Security, Many Markets: Determining the
Contributions to Price Discovery”, The Journal of Finance, Vol. 50 No. 4, pp.
1175–1199.
Jentzsch, C. (2016), “Decentralized autonomous organization to automate
governance”, White paper, November.
Lamport, L., Shostak, R. and Pease, M. (1982), “The Byzantine Generals
Problem”, ACM Trans. Program. Lang. Syst., Vol. 4 No. 3, pp. 382–401.
MADHAVAN, A. (1992), “Trading Mechanisms in Securities Markets”, The
Journal of Finance, Vol. 47 No. 2, pp. 607–641.
Malinova, K. and Park, A. (2017), “Market Design with Blockchain
Technology”.
Nakamoto, S. (2008), “Bitcoin: A peer-to-peer electronic cash system”.
Notheisen, B., Gödde, M. and Weinhardt, C. (2017a), “Trading Stocks on
Blocks. Engineering Decentralized Markets”, Designing the Digital
Transformation Proceedings of the 12th International Conference (DESRIST
2017), Vol. 12, pp. 474–478.
Notheisen, B., Hawlitschek, F. and Weinhardt, C. (2017b), “Breaking Down
the Blockchain Hype. Towards a Blockchain Market Engineering Approach”, 25th
European Conference on Information Systems (ECIS).
S. S. Zhang, M. Wagener, A. Storkenmaier and C. Weinhardt (Eds.) (2011),
The Quality of Electronic Markets, 2011 44th Hawaii International Conference on
System Sciences.
Szabo, N. (1997), “Formalizing and securing relationships on public
networks”, First Monday, Vol. 2 No. 9.
X. Xu, C. Pautasso, L. Zhu, V. Gramoli, A. Ponomarev, A. B. Tran and S.
Chen (Eds.) (2016), The Blockchain as a Software Connector, 2016 13th
Working IEEE/IFIP Conference on Software Architecture (WICSA).
…
26 Trading Stocks on Blocks | Benedikt Notheisen
Thank you for your attention!
Benedikt Notheisen
Karlsruhe Institute of Technology
Institute of Information System and Marketing
benedikt.notheisen@kit.edu
27
BACKUP
Trading Stocks on Blocks | Benedikt Notheisen
28
UML Class Diagram
Trading Stocks on Blocks | Benedikt Notheisen
[Notheisen et al., 2017a]
29
The IPO Process
Trading Stocks on Blocks | Benedikt Notheisen
[Notheisen et al., 2017a]
31
“Gatekeeper” for
order-inclusion
Traders
Trading Stocks on Blocks | Benedikt Notheisen
[Malinova and Park, 2016; Notheisen et al., 2017a]
Selection for matching mechanism
is independent from traders
Classic Market Stocks on Blocks
The traders take turns to propose
which orders to include in the next
block
OFP1 … OFPN
Market Operator
OFP1 … OFPN
OFPt
Strategic Order Flow Providers (Nodes)
32
The Node’s List of unconfirmed Transactions is
called Mempool
Trading Stocks on Blocks | Benedikt Notheisen
https://blockchain.info/en/unconfirmed-transactions
33
The Mempool of a Decentralized Exchange
Trading Stocks on Blocks | Benedikt Notheisen
Order Flow
Provider
Order Flow
Provider
Order Flow
Provider
Order Flow
Provider
Order Flow
Provider
Genesis Block i Block i+1
Mempool (time precedence)
---------------------------------------
TX1 including timestamp
TX2 including timestamp
….
TXn including timestamp
private, permissioned
Order Flow
Provider
Order Flow
Provider
[Notheisen et al., 2017b]
34
Attacking the Mempool
Trading Stocks on Blocks | Benedikt Notheisen
51% Attack
Spoofing
Attempts are made to provide enough computing power of the PoW that the
"ledger" can be changed.
Solution: PoS or use of existing blockchain (e.g. ERC20)
or audit during Clearing and Settlement
Idea: excessive limit orders are placed with low transaction costs. The market
price can move because of the anticipation, the actual orders are never taken
into the blockchain or cancelled immediately.
Solution: Flat fees, time precedence rule or third party audits, is influenced
by level of transparency and possibility to identify parties
[V. Buterin, “What Proof of Stake Is And Why It Matters”, Bitcoin Magazine]
https://www.bloomberg.com/quicktake/spoofing
35 Trading Stocks on Blocks | Benedikt Notheisen
Front-running
Frontrunning refers to a trade that is executed on the basis of
confidential information regarding the trade of a third party.
On a blockchain market because of:
• the latency-related asymmetry of the information distribution and
• the iterative determination of the OFP that decides, which bids are listed on the
stock exchange
Solution: Flat block fees and time precedence or third party audits
[Malinova and Park, 2016]
Attacking the Mempool
36
Incentive Compatibility must be guaranteed.
Trading Stocks on Blocks | Benedikt Notheisen
As on conventional markets, various (undesired) strategies can be applied:
As the OFPs trade simultaneously and decide which transactions are
included in the blocks, incentive compatibility must be ensured.
Additionally, new challenges arise:
Front-runningSpoofing …
51% Attack …

Trading Stocks on Blocks - The Quality of Decentralized Markets

  • 1.
    KIT – Universityof the State of Baden-Wuerttemberg and National Research Center of the Helmholtz Association www.kit.edu Trading Stocks on Blocks The Quality of Decentralized Markets Benedikt Notheisen FinteQC, June 20 – June 21, 2018, Lévis
  • 2.
    2 Central Blockchain Features [Nakamoto,2008; Lamport et al., 1982; Szabo, 1997; Xu et al., 2016; Notheisen et al., 2017b] Distributed database Decentralized consensus mechanism Cryptographic security Trading Stocks on Blocks | Benedikt Notheisen
  • 3.
    3 Central Blockchain Features & [Nakamoto,2008; Lamport et al., 1982; Szabo, 1997; Xu et al., 2016; Notheisen et al., 2017b] Smart contract = code executed within the distributed network Complexity Contractual agreements Autonomous agents Full scale software Computing power Distributed database Decentralized consensus mechanism Cryptographic security Trading Stocks on Blocks | Benedikt Notheisen
  • 4.
    4 Motivation Trading Stocks onBlocks | Benedikt Notheisen Transacting complex assets on a blockchain-system is easy – but what about real decentralization? Full disintermediation Spontaneous markets Cost savings?  Resilient and intermediary-free market platform to trade complex real world assets  Resolution of inefficiencies in low-volume OTC-markets [Duffie et al., 2005]  Alternative VC-mechanism [Jenztsch, 2015] [Notheisen et al. 2017a]
  • 5.
    5 Some Practical Examples TradingStocks on Blocks | Benedikt Notheisen https://github.com/etherex https://www.raidex.io/ https://www.shar evest.co/ https://goo.g l/WbG1W7 https://www. augur.net/
  • 6.
    6 Trading Stocks onBlocks – System Design Trading Stocks on Blocks | Benedikt Notheisen <<struct>> Local Balance <<struct>> Market <<struct>> OrderID <<struct>> Order <<contract>> TokenStandard ------------------------------------ Var. ------------------------------------ + total supply ( ): void + transfer ( ): boolean + approve ( ): boolean + allowance ( ): unint256 <<contract>> DSX ---------------------------------- Var. ---------------------------------- + registerToken ( ): void + buy ( ): void + sell ( ): void - SaveOrder ( ) void - Match ( ): void 0…n 0…n 0…n 0…n 0…n 0…n 1 1 1 1 1 1 Features • Intermediary-free design • Complex assets • Convenience features • Matching followed by joint clearing, and settlement Market mechanism • Continuous double auction • Limit Order Books • Price-time-precedence Performance • # Tx: 2 / sec (24 / block) • Cost: 90 * 10-6 EUR (0.2 Mio. / 4.7 Mio gas) • Latency: 12 sec • Stale rate: 50% • Block size 1.5 KB [Notheisen et al. 2017a]
  • 7.
    7 Trading Stocks onBlocks – System Design Trading Stocks on Blocks | Benedikt Notheisen Features • Intermediary-free design • Complex assets • Convenience features • Matching followed by joint clearing, and settlement Market mechanism • Continuous double auction • Limit Order Books • Price-time-precedence Performance • # Tx: 2 / sec (24 / block) • Cost: 90 * 10-6 EUR (0.2 Mio. / 4.7 Mio gas) • Latency: 12 sec • Stale rate: 50% • Block size 1.5 KB [Notheisen et al. 2017a] <<struct>> Local Balance <<struct>> Market <<struct>> OrderID <<struct>> Order <<contract>> TokenStandard ------------------------------------ Var. ------------------------------------ + total supply ( ): void + transfer ( ): boolean + approve ( ): boolean + allowance ( ): unint256 <<contract>> DSX ---------------------------------- Var. ---------------------------------- + registerToken ( ): void + buy ( ): void + sell ( ): void - SaveOrder ( ) void - Match ( ): void 0…n 0…n 0…n 0…n 0…n 0…n 1 1 1 1 1 1
  • 8.
    8 Trading Stocks onBlocks – System Design Trading Stocks on Blocks | Benedikt Notheisen Features • Intermediary-free design • Complex assets • Convenience features • Matching followed by joint clearing, and settlement Market mechanism • Continuous double auction • Limit Order Books • Price-time-precedence Performance • # Tx: 2 / sec (24 / block) • Cost: 90 * 10-6 EUR (0.2 Mio. / 4.7 Mio gas) • Latency: 12 sec • Stale rate: 50% • Block size 1.5 KB [Notheisen et al. 2017a] <<struct>> Local Balance <<struct>> Market <<struct>> OrderID <<struct>> Order <<contract>> TokenStandard ------------------------------------ Var. ------------------------------------ + total supply ( ): void + transfer ( ): boolean + approve ( ): boolean + allowance ( ): unint256 <<contract>> DSX ---------------------------------- Var. ---------------------------------- + registerToken ( ): void + buy ( ): void + sell ( ): void - SaveOrder ( ) void - Match ( ): void 0…n 0…n 0…n 0…n 0…n 0…n 1 1 1 1 1 1
  • 9.
    9 Trading Stocks onBlocks – System Design Trading Stocks on Blocks | Benedikt Notheisen Features • Intermediary-free design • Complex assets • Convenience features • Matching followed by joint clearing, and settlement Market mechanism • Continuous double auction • Limit Order Books • Price-time-precedence Performance • # Tx: 2 / sec (24 / block) • Cost: 90 * 10-6 EUR (0.2 Mio. / 4.7 Mio gas) • Latency: 12 sec • Stale rate: 50% • Block size 1.5 KB [Notheisen et al. 2017a] <<struct>> Local Balance <<struct>> Market <<struct>> OrderID <<struct>> Order <<contract>> TokenStandard ------------------------------------ Var. ------------------------------------ + total supply ( ): void + transfer ( ): boolean + approve ( ): boolean + allowance ( ): unint256 <<contract>> DSX ---------------------------------- Var. ---------------------------------- + registerToken ( ): void + buy ( ): void + sell ( ): void - SaveOrder ( ) void - Match ( ): void 0…n 0…n 0…n 0…n 0…n 0…n 1 1 1 1 1 1
  • 10.
    10 Research Question &Research Focus Trading Stocks on Blocks | Benedikt Notheisen Evaluation of..  … the potential of intermediary-free market setups and  … the quality of decentralized markets in general. Identification of…  … impeding factors and  … trade-offs between design parameters. Derivation of…  … a quantitative quality performance relationship and  … design principles for decentralized markets. How do different design parameters that determine the performance of blockchain-based markets impact market quality? Simulation of a decentralized market based on actual trading data
  • 11.
    11 Research Framework Trading Stockson Blocks | Benedikt Notheisen Technology Competition Regulation Business Structure Customers Products IT- Systems Trading System Degree of Automation Market Microstructure Execution System Transparency [Zhang et al., 2011]
  • 12.
    12 Research Framework Trading Stockson Blocks | Benedikt Notheisen Technology Competition Regulation Business Structure Customers Products IT- Systems Trading System Degree of Automation Market Microstructure Execution System Transparency Market Quality Measures Activity Trading Intensity Market Activity Liquidity Spread Measures Depth Information Price Impact Permanent Information Impact [Zhang et al., 2011]
  • 13.
    13 Research Framework Trading Stockson Blocks | Benedikt Notheisen Technology Competition Regulation Business Structure Customers Products IT- Systems Trading System Degree of Automation Market Microstructure Execution System Transparency Market Quality Measures Activity Trading Intensity Market Activity Liquidity Spread Measures Depth Information Price Impact Permanent Information Impact [Zhang et al., 2011]
  • 14.
    14 Research Framework –Related Literature Trading Stocks on Blocks | Benedikt Notheisen Spread measures emerge from the idea that spreads result from direct transaction costs which need to be covered by dealers. [Hasbrouck, 1991] Price discovery can be defined as the process by which new information is incorporated into security prices. [Hasbrouck, 1991] The price discovery for the DJIA stocks occurs at the exchange with the largest market share (reference market, NYSE). Xetra as reference market in Germany. [Hasbrouck, 1995; Clapham and Zimmerman, 2016] Frequent batch auctions provide initial implications for blockchain-based matching (greater price efficiency, higher information costs for traders, design response HFTs). Maximum market quality prevails at intermediate intervals of a few seconds. [Madhavan, 2992; Budish et al., 2014; Budish et al., 2015; Fricke and Gerig, 2016] Measurement of market quality The quality of blockchain-based markets depends on… Matching intervals (block creation time) Batch size (block size)
  • 15.
    15 Technology Competition Regulation Market Quality Measures ResearchFramework – Liquidity Measures Trading Stocks on Blocks | Benedikt Notheisen Business Structure Customers Products IT- Systems Trading System Degree of Automation Market Microstructure Execution System Transparency Activity Trading Intensity Market Activity Liquidity Spread Measures Depth Information Price Impact Permanent Information Impact [Zhang et al., 2011] Liquidity Measures • Quoted Spread i, t = Ask i,t −Bid i,t 2∗Mid i,t • Effective Spread i, t = Di, t ∗ Price i,t −Mid i,t Mid i,t • Realized Spread i, t = Di, t ∗ Price i,t −Mid i,t+x Mid i,t • Amihud Illiquidity i, t = 1 dt σt=1 dt |Return i,t| Price i,t ∗ Volume i,t Information Measure • Price Impact i, t = Di, t ∗ Mid i,t+x−Mid i,t Mid i,t
  • 16.
    16 Summary Statistics –Data Sample Trading Stocks on Blocks | Benedikt Notheisen 2013 2014 2015 2016 2017 Total Period Total Submissions 439,506 331,617 522,349 334,701 254,970 1,883,143 Total Executions 308,816 257,818 400,487 265,348 208,253 1,440,722 Total Trading Volume 4,942,959,500 4,503,355,973 7,492,697,871 4,184,648,839 3,861,366,320 24,985,028,503 Trading Days 253 252 253 237 236 1,231 Submissions per Day Average 1,737.18 1,315.94 2,064.62 1,412.24 1,080.38 1,529.77 Median 1,656.00 1,207.00 1,618.00 1,305.00 998.00 1,334.00 Standard Deviation 502.74 489.05 1,318.86 847.53 362.80 859.30 Executions per Day Average 1,220.62 1,023.09 1,582.95 1,119.61 882.43 1,170.37 Median 1,158.00 929.50 1,255.00 1,017.00 823.00 1,014.00 Standard Deviation 353.60 400.17 1,006.99 700.09 314.46 659.82 Trading Volume per Day Average 19,537,389 17,870,460 29,615,407 17,656,746 16,361,722 20,296,530 Median 18,100,014 16,655,422 20,967,750 16,251,023 15,409,822 17,101,315 Standard Deviation 6,664,402 7,746,418 21,575,427 9,604,725 6,451,717 12,878,994 Shares per Trade Average 579.60 566.67 493.94 558.25 589.43 550.96 Median 200.00 160.00 135.00 150.00 150.00 150.00 Standard Deviation 1,963.00 1,728.18 1,471.44 1,890.38 1,756.00 1,751.43 Year Sample Characteristics January 2013 to December 2017 DAX 30 – German Blue Chips (index composition as of December 31, 2017) Time-stamped order-level data  order type and limits  price and quantity  enterparty ID
  • 17.
    17 Summary Statistics –Trade Volume Trading Stocks on Blocks | Benedikt Notheisen Stock Group → High Trade Medium Trade Low Trade Node Group ↓ Volume Volume Volume Very High Trade 14,621.38 5,247.27 1,695.77 21,564.42 Volume 58.52% 21.00% 6.79% 86.31% High Trade 1,777.48 725.37 280.59 2,783.44 Volume 7.11% 2.90% 1.12% 11.14% Medium Trade 326.81 125.17 66.69 518.67 Volume 1.31% 0.50% 0.27% 2.08% Low Trade 69.48 30.04 13.82 113.34 Volume 0.28% 0.12% 0.06% 0.45% Very Low Trade 2.33 1.66 1.16 5.15 Volume 0.01% 0.01% 0.00% 0.02% 16,797.49 6,129.51 2,058.03 24,985.03 67.23% 24.53% 8.24% 100.00% Sum Sum Trade volume in millions of EUR
  • 18.
    18 Simulation Model Trading Stockson Blocks | Benedikt Notheisen Parameters of Simulation Scenarios Block Size Block Creation Time Simulation input Raw order data Simulated Matching Engine Based on the trading rules of the Stuttgart stock exchange https://www.boerse-stuttgart.de/en/company/all- about-trading/rules-and-regulations/ Executions Simulation output Analysis • Market quality simulated vs. actual market (Stuttgart stock exchange) • Simulation scenarios are designed to quantify the impact blockchain parameters variations on market quality
  • 19.
    19 Simulation Scenarios Block Size LowMedium High BlockCreationTime 𝑡 𝑛𝑜𝑟𝑚𝑎𝑙 ∗ [Fricke and Gerig, 2016] 10 sec / 10 orders 10 sec / 100 orders 10 sec / 1,000 orders 𝑡 𝑝𝑒𝑎𝑘 ∗ [Fricke and Gerig, 2016] 5 sec / 10 orders 5 sec / 100 orders 5 sec / 1,000 orders Low 12 sec / 24 orders 12 sec / 200 orders 12 sec / 1,000 orders Medium 1 min / 24 orders 1 min / 100 orders 1 min / 1,000 orders High 10 min / 24 orders 10 min / 100 orders 10 min / 1,000 orders Trading Stocks on Blocks | Benedikt Notheisen
  • 20.
    20 Simulation Scenarios Block Size LowMedium High BlockCreationTime 𝑡 𝑛𝑜𝑟𝑚𝑎𝑙 ∗ [Fricke and Gerig, 2016] 10 sec / 10 orders 10 sec / 100 orders 10 sec / 1,000 orders 𝑡 𝑝𝑒𝑎𝑘 ∗ [Fricke and Gerig, 2016] 5 sec / 10 orders 5 sec / 100 orders 5 sec / 1,000 orders Low 12 sec / 24 orders 12 sec / 200 orders 12 sec / 1,000 orders Medium 1 min / 24 orders 1 min / 100 orders 1 min / 1,000 orders High 10 min / 24 orders 10 min / 100 orders 10 min / 1,000 orders Trading Stocks on Blocks | Benedikt Notheisen
  • 21.
    21 Simulation Scenarios Block Size LowMedium High BlockCreationTime 𝑡 𝑛𝑜𝑟𝑚𝑎𝑙 ∗ [Fricke and Gerig, 2016] 10 sec / 10 orders 10 sec / 100 orders 10 sec / 1,000 orders 𝑡 𝑝𝑒𝑎𝑘 ∗ [Fricke and Gerig, 2016] 5 sec / 10 orders 5 sec / 100 orders 5 sec / 1,000 orders Low 12 sec / 24 orders 12 sec / 200 orders 12 sec / 1,000 orders Medium 1 min / 24 orders 1 min / 100 orders 1 min / 1,000 orders High 10 min / 24 orders 10 min / 100 orders 10 min / 1,000 orders Trading Stocks on Blocks | Benedikt Notheisen
  • 22.
    22 Simulation Scenarios Block Size LowMedium High BlockCreationTime 𝑡 𝑛𝑜𝑟𝑚𝑎𝑙 ∗ [Fricke and Gerig, 2016] 10 sec / 10 orders 10 sec / 100 orders 10 sec / 1,000 orders 𝑡 𝑝𝑒𝑎𝑘 ∗ [Fricke and Gerig, 2016] 5 sec / 10 orders 5 sec / 100 orders 5 sec / 1,000 orders Low 12 sec / 24 orders 12 sec / 200 orders 12 sec / 1,000 orders Medium 1 min / 24 orders 1 min / 100 orders 1 min / 1,000 orders High 10 min / 24 orders 10 min / 100 orders 10 min / 1,000 orders Trading Stocks on Blocks | Benedikt Notheisen Exclusion of infeasible configurations based on minimum standards for data security.
  • 23.
    23 Empirical Strategy Trading Stockson Blocks | Benedikt Notheisen Δ𝑄𝑢𝑎𝑙𝑖𝑡𝑦 = 𝛼 + 𝛽1 𝑠𝑖𝑧𝑒 + 𝛽2 𝑡𝑖𝑚𝑒 + 𝛽3 𝑠𝑖𝑧𝑒 ∗ 𝑡𝑖𝑚𝑒 + 𝛿 𝑔𝑟𝑜𝑢𝑝 + 𝛾 𝑐𝑜𝑛𝑡𝑟𝑜𝑙𝑠 + 𝜀 𝑄𝑢𝑎𝑙𝑖𝑡𝑦𝑆𝑖𝑚 − 𝑄𝑢𝑎𝑙𝑖𝑡𝑦 𝐸𝑥 Block size Block size creation interaction VolGroup, NodeGroup, Execution ratio Simulation bias Block creation time Interactions with VolGroup & NodeGroup Separate analysis for each liquidity & information measure Specification of the VolGroup and NodeGroup dummies Robustness, appropriate controls, and empirical details
  • 24.
    24 Conclusion & Outlook TradingStocks on Blocks | Benedikt Notheisen Significance to research and practice Challenges and future research opportunities Information propagation throughout the network Technological limitations Strategic behavior of market participants Data from real-world financial markets Direct design implications Analysis of performance-related quality drivers Technology-agnostic evaluation
  • 25.
    25 References Trading Stocks onBlocks | Benedikt Notheisen Budish, E., Cramton, P. and Shim, J. (2014), “Implementation Details for Frequent Batch Auctions: Slowing Down Markets to the Blink of an Eye”, American Economic Review, Vol. 104 No. 5, pp. 418–424. Budish, E., Cramton, P. and Shim, J. (2015), “The High-Frequency Trading Arms Race: Frequent Batch Auctions as a Market Design Response *”, The Quarterly Journal of Economics, Vol. 130 No. 4, pp. 1547–1621. Clapham, B. and Zimmermann, K. (2016), “Price discovery and convergence in fragmented securities markets”, International Journal of Managerial Finance, Vol. 12 No. 4, pp. 381–407. Duffie, D., Gârleanu, N. and Pedersen, L.H. (2005), “Over‐the‐Counter Markets”, Econometrica, Vol. 73 No. 6, pp. 1815–1847. Fricke, D. and Gerig, A. (2018), “Too fast or too slow? Determining the optimal speed of financial markets”, Quantitative Finance, Vol. 18 No. 4, pp. 519– 532. Hasbrouck, J. (1991), “Measuring the Information Content of Stock Trades”, The Journal of Finance, Vol. 46 No. 1, pp. 179–207. Hasbrouck, J. (1995), “One Security, Many Markets: Determining the Contributions to Price Discovery”, The Journal of Finance, Vol. 50 No. 4, pp. 1175–1199. Jentzsch, C. (2016), “Decentralized autonomous organization to automate governance”, White paper, November. Lamport, L., Shostak, R. and Pease, M. (1982), “The Byzantine Generals Problem”, ACM Trans. Program. Lang. Syst., Vol. 4 No. 3, pp. 382–401. MADHAVAN, A. (1992), “Trading Mechanisms in Securities Markets”, The Journal of Finance, Vol. 47 No. 2, pp. 607–641. Malinova, K. and Park, A. (2017), “Market Design with Blockchain Technology”. Nakamoto, S. (2008), “Bitcoin: A peer-to-peer electronic cash system”. Notheisen, B., Gödde, M. and Weinhardt, C. (2017a), “Trading Stocks on Blocks. Engineering Decentralized Markets”, Designing the Digital Transformation Proceedings of the 12th International Conference (DESRIST 2017), Vol. 12, pp. 474–478. Notheisen, B., Hawlitschek, F. and Weinhardt, C. (2017b), “Breaking Down the Blockchain Hype. Towards a Blockchain Market Engineering Approach”, 25th European Conference on Information Systems (ECIS). S. S. Zhang, M. Wagener, A. Storkenmaier and C. Weinhardt (Eds.) (2011), The Quality of Electronic Markets, 2011 44th Hawaii International Conference on System Sciences. Szabo, N. (1997), “Formalizing and securing relationships on public networks”, First Monday, Vol. 2 No. 9. X. Xu, C. Pautasso, L. Zhu, V. Gramoli, A. Ponomarev, A. B. Tran and S. Chen (Eds.) (2016), The Blockchain as a Software Connector, 2016 13th Working IEEE/IFIP Conference on Software Architecture (WICSA). …
  • 26.
    26 Trading Stockson Blocks | Benedikt Notheisen Thank you for your attention! Benedikt Notheisen Karlsruhe Institute of Technology Institute of Information System and Marketing benedikt.notheisen@kit.edu
  • 27.
    27 BACKUP Trading Stocks onBlocks | Benedikt Notheisen
  • 28.
    28 UML Class Diagram TradingStocks on Blocks | Benedikt Notheisen [Notheisen et al., 2017a]
  • 29.
    29 The IPO Process TradingStocks on Blocks | Benedikt Notheisen [Notheisen et al., 2017a]
  • 30.
    31 “Gatekeeper” for order-inclusion Traders Trading Stockson Blocks | Benedikt Notheisen [Malinova and Park, 2016; Notheisen et al., 2017a] Selection for matching mechanism is independent from traders Classic Market Stocks on Blocks The traders take turns to propose which orders to include in the next block OFP1 … OFPN Market Operator OFP1 … OFPN OFPt Strategic Order Flow Providers (Nodes)
  • 31.
    32 The Node’s Listof unconfirmed Transactions is called Mempool Trading Stocks on Blocks | Benedikt Notheisen https://blockchain.info/en/unconfirmed-transactions
  • 32.
    33 The Mempool ofa Decentralized Exchange Trading Stocks on Blocks | Benedikt Notheisen Order Flow Provider Order Flow Provider Order Flow Provider Order Flow Provider Order Flow Provider Genesis Block i Block i+1 Mempool (time precedence) --------------------------------------- TX1 including timestamp TX2 including timestamp …. TXn including timestamp private, permissioned Order Flow Provider Order Flow Provider [Notheisen et al., 2017b]
  • 33.
    34 Attacking the Mempool TradingStocks on Blocks | Benedikt Notheisen 51% Attack Spoofing Attempts are made to provide enough computing power of the PoW that the "ledger" can be changed. Solution: PoS or use of existing blockchain (e.g. ERC20) or audit during Clearing and Settlement Idea: excessive limit orders are placed with low transaction costs. The market price can move because of the anticipation, the actual orders are never taken into the blockchain or cancelled immediately. Solution: Flat fees, time precedence rule or third party audits, is influenced by level of transparency and possibility to identify parties [V. Buterin, “What Proof of Stake Is And Why It Matters”, Bitcoin Magazine] https://www.bloomberg.com/quicktake/spoofing
  • 34.
    35 Trading Stockson Blocks | Benedikt Notheisen Front-running Frontrunning refers to a trade that is executed on the basis of confidential information regarding the trade of a third party. On a blockchain market because of: • the latency-related asymmetry of the information distribution and • the iterative determination of the OFP that decides, which bids are listed on the stock exchange Solution: Flat block fees and time precedence or third party audits [Malinova and Park, 2016] Attacking the Mempool
  • 35.
    36 Incentive Compatibility mustbe guaranteed. Trading Stocks on Blocks | Benedikt Notheisen As on conventional markets, various (undesired) strategies can be applied: As the OFPs trade simultaneously and decide which transactions are included in the blocks, incentive compatibility must be ensured. Additionally, new challenges arise: Front-runningSpoofing … 51% Attack …