Liquidity Tree
Liquidity Pool Design for Specialised Prediction Markets
Dan Kaizer
2
Azuro protocol
the future of decentralized betting
Azuro ecosystem: scaling solutions 133
Azuro ecosystem:
Scalability powered
scaling
by revenue
solutions
distribution 1374
Decentralized betting still ineffective 45
Academic approach, lack of betting understanding
1 pool 1 event
EVENT-
SPECIFIC
LIQUIDITY
✖ high-risk for liquidity providers
✖ almost no events/markets
✖ poor UX for both LPs and bettors
Azuro: constant stream of liquid markets 56
Competitive
fixed odds
7
Classic Liquidity Pool 8
Classic Liquidity Pool 9
Azuro Liquidity Pool - Fraud Possibility 10
Azuro Liquidity Pool - Fraud Possibility 11
LP
1000
Azuro Liquidity Pool - Fraud Possibility 12
Got instant profit without any
risk
LP
1000
Muggle’s Solution 13
Muggle’s Solution 14
mapping(address => LP) liquidity
15
Giant Loop
16
O(log n)
Complexity
17
18
Navigation 19
• left child of the node K has the index 2*K
• right child has the number 2*K+1
• Even index => left leaf
• Odd index => right leaf
“Liquidity Tree” 20
Adding Liquidity 21
Taking Liquidity to the Game 22
Must Remember the last initialised Leaf
Taking Liquidity to the Game 23
Return Liquidity 24
• Made by passing the return amount and the leaf number, indicating the range of
distribution of the returned amount from the first element to "leaf number" at the time of
"taking liquidity"
Withdraw Liquidity 25
• Search for "most updated parent" of the leaf
• leaf's amount value updating from the "most updated parent" (recursively from parent to
child)
• full liquidity withdrawal from the leaf, updating all parent nodes from the leaf to the root
node.
Withdraw Liquidity 26
27
@D_Kaiser
@azuroprotocol [Link]