From e89d152887ef324b60ccb5c6d4dae7719a1dd678 Mon Sep 17 00:00:00 2001 From: bt3gl <1130416+bt3gl@users.noreply.github.com> Date: Sat, 17 Sep 2022 17:30:53 -0700 Subject: [PATCH] Update delegatecall-notes.md --- Smart-Contract-Security/delegatecall-notes.md | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/Smart-Contract-Security/delegatecall-notes.md b/Smart-Contract-Security/delegatecall-notes.md index 2b34039..47351b5 100644 --- a/Smart-Contract-Security/delegatecall-notes.md +++ b/Smart-Contract-Security/delegatecall-notes.md @@ -3,6 +3,27 @@
+#### 🖤 This is my favorite vuln + +
+ +--- + +### TL;DR + +1. Call to untrusted contracts may introduce unexpected risks and errors. +2. External calls controlled by an attacker may force a contract to transition into an undefined state. +3. Types of external calls: `STATIC CALL` and `DELEGATE CALL`. +4. Using DELEGATE CALL, contract can preserve the storage state while using the logic of the contract. This introduces the concept of Proxies. +5. The proxy contract redirects all the calls it receives to an "logic contract", whose address is stored in its "proxy contract". The proxy runs the "logic contract"'s code as its own (modifying its storage and the balance of the "proxy contract"). + +Screen Shot 2022-09-17 at 5 30 04 PM + + +
+ + +--- ### Learning resources