Spaces:
Sleeping
Sleeping
ajaxwin commited on
Commit ·
c098748
1
Parent(s): 7203787
Updated dataset
Browse files- data/Template.json +6 -6
- data/contracts.json +0 -0
data/Template.json
CHANGED
|
@@ -51,8 +51,8 @@
|
|
| 51 |
"events": ["Transfer"],
|
| 52 |
"vulnerable": false,
|
| 53 |
"vulnerability_details": null,
|
| 54 |
-
"
|
| 55 |
-
"
|
| 56 |
},
|
| 57 |
{
|
| 58 |
"name": "withdraw",
|
|
@@ -78,8 +78,8 @@
|
|
| 78 |
"description": "The withdraw function updates balance after making an external call, allowing reentrancy attacks",
|
| 79 |
"mitigation": "Use checks-effects-interactions pattern: update balance before external call"
|
| 80 |
},
|
| 81 |
-
"
|
| 82 |
-
"
|
| 83 |
}
|
| 84 |
],
|
| 85 |
|
|
@@ -129,8 +129,8 @@
|
|
| 129 |
"description": "The withdraw function updates state after making an external call, allowing reentrancy attacks where an attacker can recursively call withdraw before the balance is updated",
|
| 130 |
"status": "Fixed",
|
| 131 |
"mitigation": "Moved balance update before external call (checks-effects-interactions pattern)",
|
| 132 |
-
"
|
| 133 |
-
"
|
| 134 |
}
|
| 135 |
],
|
| 136 |
|
|
|
|
| 51 |
"events": ["Transfer"],
|
| 52 |
"vulnerable": false,
|
| 53 |
"vulnerability_details": null,
|
| 54 |
+
"property": null,
|
| 55 |
+
"property_specification": null
|
| 56 |
},
|
| 57 |
{
|
| 58 |
"name": "withdraw",
|
|
|
|
| 78 |
"description": "The withdraw function updates balance after making an external call, allowing reentrancy attacks",
|
| 79 |
"mitigation": "Use checks-effects-interactions pattern: update balance before external call"
|
| 80 |
},
|
| 81 |
+
"property": "When a user withdraws x amount of ETH, the user's balance should decrease by x. Due to reentrancy, an attacker can call withdraw recursively before balance is updated, draining more than their balance.",
|
| 82 |
+
"property_specification": "Pre-condition: User has balance B. Operation: withdraw(amount). Expected post-condition: User balance = B - amount. Actual vulnerability: Reentrant calls allow multiple withdrawals before balance update, resulting in user balance = B - (n * amount) where n > 1, violating the expected post-condition."
|
| 83 |
}
|
| 84 |
],
|
| 85 |
|
|
|
|
| 129 |
"description": "The withdraw function updates state after making an external call, allowing reentrancy attacks where an attacker can recursively call withdraw before the balance is updated",
|
| 130 |
"status": "Fixed",
|
| 131 |
"mitigation": "Moved balance update before external call (checks-effects-interactions pattern)",
|
| 132 |
+
"property": "When a user withdraws x amount, the user's balance should decrease by x. Due to reentrancy, an attacker can withdraw multiple times before balance updates, draining more than their balance.",
|
| 133 |
+
"property_specification": "Pre-condition: User balance = B. Operation: withdraw(amount). Expected: User balance = B - amount. Actual: Reentrant calls allow user balance = B - (n * amount) where n > 1."
|
| 134 |
}
|
| 135 |
],
|
| 136 |
|
data/contracts.json
CHANGED
|
The diff for this file is too large to render.
See raw diff
|
|
|