forked from coinspect/learn-evm-attacks
-
Notifications
You must be signed in to change notification settings - Fork 1
/
paraluni.wsd
98 lines (68 loc) · 1.45 KB
/
paraluni.wsd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
@startuml
interface IParaluniPair {
' -- inheritance --
{abstract}IUniswapV2Pair
' -- usingFor --
' -- vars --
' -- methods --
}
interface IParaProxy {
' -- inheritance --
' -- usingFor --
' -- vars --
' -- methods --
+depositByAddLiquidity()
+withdrawAndRemoveLiquidity()
+withdrawChange()
+userInfo()
+withdraw()
}
interface IParaRouter {
' -- inheritance --
' -- usingFor --
' -- vars --
' -- methods --
+addLiquidity()
+removeLiquidity()
}
class Exploit_Paraluni {
' -- inheritance --
{abstract}TestHarness
{abstract}TokenBalanceTracker
' -- usingFor --
' -- vars --
#[[IERC20]] bscusd
#[[IERC20]] busd
#[[EvilToken]] ukrBadToken
#[[EvilToken]] russiaGoodToken
#[[IParaluniPair]] paraluniBSCBUSDPair
#[[IParaRouter]] paraRouter
#[[IParaProxy]] paraProxy
#[[IUniswapV2Pair]] pancakeBSCBUSDPair
' -- methods --
+setUp()
+test_attack()
+pancakeCall()
}
class EvilToken {
' -- inheritance --
' -- usingFor --
' -- vars --
#[[IERC20]] bscusd
#[[IERC20]] busd
#[[IParaProxy]] paraProxy
+[[string]] name
+[[string]] symbol
#[[address]] owner
' -- methods --
+**__constructor__**()
+🔍allowance()
+🔍balanceOf()
+transferFrom()
+withdrawAsset()
}
' -- inheritance / usingFor --
IParaluniPair --[#DarkGoldenRod]|> IUniswapV2Pair
Exploit_Paraluni --[#DarkGoldenRod]|> TestHarness
Exploit_Paraluni --[#DarkGoldenRod]|> TokenBalanceTracker
@enduml