forked from coinspect/learn-evm-attacks
-
Notifications
You must be signed in to change notification settings - Fork 0
/
onering.wsd
57 lines (39 loc) · 873 Bytes
/
onering.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
@startuml
interface IOneRingVault {
' -- inheritance --
' -- usingFor --
' -- vars --
' -- methods --
+depositSafe()
+withdraw()
+🔍balanceOf()
+🔍getSharePrice()
}
interface ISolidlyPair {
' -- inheritance --
{abstract}IUniswapV2Pair
' -- usingFor --
' -- vars --
' -- methods --
}
class Exploit_OneRingFinance {
' -- inheritance --
{abstract}TestHarness
{abstract}TokenBalanceTracker
' -- usingFor --
' -- vars --
#[[ISolidlyPair]] pairUsdc_Mim
#[[IERC20]] usdc
#[[IERC20]] mim
#[[IOneRingVault]] vault
#[[uint256]] borrowAmount
' -- methods --
+setUp()
+test_attack()
+hook()
}
' -- inheritance / usingFor --
ISolidlyPair --[#DarkGoldenRod]|> IUniswapV2Pair
Exploit_OneRingFinance --[#DarkGoldenRod]|> TestHarness
Exploit_OneRingFinance --[#DarkGoldenRod]|> TokenBalanceTracker
@enduml