DSS

DSS 2026 / Day 1 / Pearl Hall

A Safe EIP-7702 Reference Implementation

Rudra Pratap Singh

9:09 · Recording

Watch on YouTube ↗Open recording viewerOriginal programme entry
Download plain textDownload timestamped JSON

Source: YouTube automatic caption track · Exported 2026-11-16. Timestamps link to the source video. Cue end times were not supplied.

Transcript

0:02Hi everyone, good morning.

0:03So first of all,

0:06this talk was originally going to be

0:08presented by Arda from Certik, but

0:10unfortunately he's not able to make it,

0:12so I'm replacing him. So myself Rudra

0:15Pratap Singh and I lead triage at

0:17Certik.

0:18So this talk is going to be some of the

0:21design observation that we made on chain

0:24and some of the

0:26things that we noticed about EIP 7702.

0:31So next slide please.

0:33So let's first understand how

0:36EIP 7702 works. So a user signs a tuple

0:39in a type four transaction, namely chain

0:42ID, delegate and a nonce. And anybody

0:44can carry forward. So basically anybody

0:47can send it on chain or the user

0:48himself. And once it's confirmed on

0:51chain, the account points to a delegate

0:54contract that the user provided.

0:56And the contract that he

0:59delegated to would run under the context

1:01of the EOA.

1:02Next slide please.

1:04So at launch Wintermute noticed that 97%

1:09of the delegated account pointed towards

1:11the same sweeper contracts.

1:13And we looked into the current

1:17statistics where we looked into top 15

1:20delegate addresses and we found out that

1:22it constituted for 8.51 million accounts

1:26and that are

1:29marked as

1:30fishing.

1:32So that does not mean that all of these

1:34accounts are by themselves

1:37malicious, but it is more like some of

1:39these accounts are owned by the attacker

1:41themselves as throwaway accounts. Next

1:43slide please.

1:44So how does these accounts end up there?

1:47So there are two major reason. First the

1:50attacker compromised the private key of

1:52the victim. Secondly

1:55the victim fall part of our fishing

1:57campaign.

1:58At the same time a simple 7702 contract,

2:01sorry,

2:02delegate contract,

2:03has three major observation. First, it

2:06does not have any any allow list.

2:09Second, a valid signature can do

2:11anything in the account.

2:13And the last that the signature travels

2:15through across the multiple delegations.

2:18Next slide, please.

2:21Yeah. So once we delegate, there are

2:23eight powers that a delegate can hold.

2:26First, the entry point, who can make the

2:28account act. Secondly, what happens to

2:30the incoming value. Third, what hap what

2:34con outgoing calls does the delegate

2:36makes and what call data it carries.

2:39Last fourth,

2:41what a signature can authorize and does

2:44it have a replay protection or not.

2:46And gas storage owners update and some

2:49side effects.

2:50Next slide, please.

2:52So let's now look into a simple sweeper

2:54contract. So I hope you can see this. So

2:57it is very straightforward contract

3:00where we have a destination address and

3:02initialize function and a receive.

3:04So if you look into the initialize

3:06function, there is no protection on

3:08there. So once like anybody can

3:11initialize it. And if you if you can

3:14read out the receive function, it

3:15basically transfer whatever ETH that is

3:18being sent in the same transaction to

3:20the destination address.

3:22Next slide, please.

3:25A sweeper waits for water ETH. So we ran

3:28a

3:29test suite against these sweeper

3:30contracts and we found out across four

3:32properties that we tested, two of them

3:35passed while two failed. Namely, the the

3:38one that passed was a third party cannot

3:41move the existing fund that the account

3:43hold.

3:44And the front running does not moves

3:46fund.

3:47But the two properties that broke were

3:50that any incoming ETH that were

3:51forwarded after the delegation

3:53automatically moves forward to the

3:55attacker.

3:56And if you try to rescue and send

3:58additional funds, it goes to the

4:00attacker rather than staying in the

4:02account itself.

4:03Next slide, please.

4:05Five ways a transaction get replay. So

4:08the top three one are pretty widely

4:10known.

4:11But the two that are delegates and time

4:14are not widely known and adopted.

4:17So we are going to understand it

4:19better, but for the context

4:22a signature can does not automatically

4:25get cancelled out if we

4:27we delegate to a new address, meaning

4:29that if we sign some request on a

4:32previous delegation, it carries forward.

4:34And the next one is time.

4:36The

4:37thing about time is that if let's

4:39suppose that we have an allow list and

4:42if we sign a request that is not valid

4:44right now, but does not mean that it

4:47would not be valid in the future

4:49delegation. It might be a case where in

4:51the future the signature becomes valid.

4:54Next slide, please.

4:57The next thing is revoking does not

4:59means that it clears the code. Suppose

5:01that you delegate to a buggy delegate

5:04which writes owner variable in the

5:07storage.

5:08When

5:09a normal user tries to revoke the

5:12delegation, he assumes that the

5:15the storage is automatically cleared,

5:17but that's not the case.

5:19We need to whenever we are

5:20re-delegating, we need to make sure that

5:22we clear the storage ourselves.

5:24Next slide, please.

5:26Two doors, one gate. So basically we are

5:28moving forward to a design

5:30suggestion that we are making.

5:32So there are two ways a transaction

5:34reaches on chain. One, a user signs the

5:36transaction himself or he can give the

5:39signature like a signed request to

5:41another user who can submit on chain to

5:44save gas.

5:46But all of these like in in either of

5:48these cases, it goes through the gate.

5:51We are going to zoom in in the

5:52the gate itself in the next slides, but

5:55you need to understand in any in any of

5:58these cases we are making sure we are

6:01making a check against the policy in the

6:03gate itself. Next slide please.

6:06Now let's understand the gate.

6:08So there are two levels. First is

6:12the contact that we are

6:13interacting with and the function that

6:15we we are calling is it in a allow list

6:18or not and who is the recipient and the

6:21sender and whether they are approved in

6:23the allow list or not. If in any cases

6:26something breaks it the transaction does

6:28not go through

6:29and if everything seems to be good it

6:32leaves it. But they here are three

6:35major observation. First only the owner

6:37can make changes to the policy. Second

6:40when we change like make changes to the

6:43policy it takes up to 48 hours.

6:46Last removing anything affect at once.

6:48So for example if you're trying to

6:50remove some recipient from the list it

6:52takes the effect takes immediately. Next

6:56slide please.

6:58Signature can't travel. So we talked

7:00about in the previous slide about two

7:01major problems that are generally

7:03overlooked. So how do we come up

7:06across those? So first when we say when

7:09when I mention that when we sign a

7:11request it travels through the

7:13delegation. So we want to make sure that

7:15when whenever we are signing a request

7:17we embed

7:19a delegation information within the

7:20request itself so that the delegation

7:22know who it was meant to be.

7:25Next across time

7:26we need to we need to maintain a policy

7:30where we are checking against the

7:32request whether this policy that the

7:35user signed was meant to meant for it or

7:37not.

7:38And after

7:39revocation we are wiping all the

7:41policies that

7:43that was

7:45in there at that time.

7:46Next slide please.

7:49There are some caveats to the design.

7:52I'm going to discuss two of them.

7:54First as I mentioned that whenever we we

7:56are making a new changes we have to wait

7:59for 48 hours at least.

8:01Secondly for any new configuration that

8:03we are making we have to go and add it

8:05ourselves and there are few others as

8:08mentioned. Next slide, please.

8:11So we ran some of the tests against 35

8:16of the tests and across that we also

8:19implemented 21 deliberate bugs that we

8:23wanted to catch and our test suite

8:26actually got 21 out of 21.

8:28The

8:29then we ran we we forked the network and

8:32ran it against the those buggy

8:34implementation that we saw and it got

8:37four out of five properties that were

8:39failing meaning like the ETH that was

8:42supposed to be transferred were

8:43automatically being transferred to the

8:45attacker

8:46account. So the properties were failing.

8:49Next slide, please.

8:51So we have open sourced all of the

8:55things that we discussed the design

8:56implementation the attack suite and the

8:59test cases in our

9:00in the repo that is under the certik dev

9:03repo.

9:04So that's it for me. Thank you so much.

Source and accuracy details

Source export SHA256: 27a4eef37b90ab87dc56041d9939ab4b03f95c5ba92a44bc228ba0f4af513f6c