generated from foundry-rs/hardhat-foundry-template
-
Notifications
You must be signed in to change notification settings - Fork 214
/
bvaults.d2
45 lines (34 loc) · 1.12 KB
/
bvaults.d2
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
MaliciousToken: Malicious Token {
maliciousTransfer: transfer()
maliciousBurn: burn()
}
MaliciousPair: Malicious Pair {
maliciousSwap: swap()
}
WBNBToken: WBNB Token{
wbnbTransfer: transfer()
}
BDexPair: BDEX Pair {
vaultSwap: swap()
}
BVault: Vault (Victim) {
convertDust: convertDustToEarned()
}
BDEXToken: BDEX Token {
bdexTransfer: transfer(BDEX Pair)
}
Attacker -> MaliciousToken.maliciousTransfer: 1°: to Malicious Pair
MaliciousToken.maliciousTransfer -> MaliciousPair.maliciousSwap: 2°
MaliciousPair.maliciousSwap -> WBNBToken.wbnbTransfer: 3°: transfer to BDEX Pair
WBNBToken.wbnbTransfer -> BDexPair.vaultSwap: 4°
BDexPair.vaultSwap -> BVault.convertDust: 5°
BVault.convertDust -> BDEXToken.bdexTransfer: 6°
BDEXToken.bdexTransfer -> BDexPair.vaultSwap: 7°
BDexPair.vaultSwap -> WBNBToken.wbnbTransfer: 8°: to Malicious Pair
WBNBToken.wbnbTransfer -> MaliciousPair.maliciousSwap: 9°
MaliciousPair.maliciousSwap -> MaliciousToken.maliciousBurn: 10°: Burn malicious tokens
explanation: |md
# BVaults
- Price Manipulation
- Arbitrary Tokens Allowed
|