DSS 2026 / Day 2 / Pearl Hall
Confidential Smart Contracts: From Mechanics to Secure Design
Rogue Rotkosky · Arturo Roura
Source: YouTube automatic caption track · Exported 2026-11-16. Timestamps link to the source video. Cue end times were not supplied.
Transcript
0:00Pass the slide. Ah, there we go.
0:04Okay, yeah. It's a pleasure to be here
0:05with with Rogue from Phoenix. I'm Arturo
0:08from ConsenSys Diligence. And yeah,
0:10we're going to be doing a small
0:11introduction to confidential smart
0:14contracts and trying to explain the
0:17mental models that we have to shift
0:19when reviewing this from a from a
0:21security standpoint.
0:22Take it away, Rogue.
0:23>> Thank you. Um, yeah. So I'm from
0:26Phoenix. Uh,
0:29bit down.
0:32Thank you. Um, I'm from Phoenix. The
0:35first three letters are FHE. So I'll
0:38assume you all know what FHE is. Um, but
0:40if you don't,
0:42FHE stands for fully homomorphic
0:44encryption.
0:45Um, this is touted as the holy grail of
0:47encryption. It allows you to encrypt a
0:50number,
0:51um, but also do computation on that
0:54number leaving it in its encrypted
0:57state.
0:58Uh,
0:58this is something that is wildly
1:00complex. However, I like this metaphor.
1:04So
1:05I have two volunteers from the audience.
1:08Um, yes, George from Diligence and uh
1:11David from Diligence. This is lucky. Uh,
1:14I'm going to ask them to
1:18Yes. I'm going to ask them to encrypt a
1:20number
1:21for me. Um, since they're brothers, they
1:23share an encryption key. So this is
1:24really helpful.
1:26Um, how they're going to encrypt a
1:28variable is they're going to think of
1:30it. So David,
1:33you've thought?
1:35George?
1:36Anything between one and two to the 256.
1:40So it can be large.
1:42Um, now if I came over there and I said,
1:45barring torture, can I compel you to
1:48give me that number? Can I put you in an
1:50MRI? Can I slice the top of your skull?
1:52Can I get that number from you?
1:55Hopefully not.
1:59But that's great. That's encryption.
2:00We're used to encryption. Um what I want
2:02to do is
2:04do an operation on this number. I want
2:07to add the two of you together. I
2:08understand you have a third brother.
2:11This is something new.
2:12So
2:13pretend I have a machine and you both
2:16step into the machine together
2:18and the arms descend and they start
2:20picking at your brains and they start
2:22stitching you two together. This is a
2:24blind machine. It doesn't know your
2:26names or your brains or the numbers
2:29inside of you. It doesn't know anything
2:30about you and it does its deterministic
2:33pattern to stitch you two together.
2:36And Captain America pops out of the
2:38machine
2:41and if we ask
2:42the result, the person that was stitched
2:45together from the two of you to think of
2:47a number between 1 and 2 to the 256
2:50the number that he will think of
2:52is the sum of your two numbers
2:55because this is the sum machine.
2:57And we've done an operation
3:00that resulted in a new number without
3:03ever knowing what you two thought of in
3:05the first place.
3:06This is an extraordinarily powerful tool
3:09to have.
3:11So we have addition
3:12and we have a separate machine for
3:14multiplication and subtraction and
3:15division. The division machine is
3:17gigantic. Don't
3:18The division machine is horrible. Um
3:21very inefficient. Well, not inefficient,
3:22but
3:24Once we have this, we can start to
3:27leverage it. So we packaged all of these
3:29machines into a box and called it
3:31coffee. Co co FHE. It's a co-processor
3:35that sits on top of the EVM and allows
3:38this power
3:40to be interfaced with via a a ecosystem
3:44that we're already in and aware of.
3:48So how this works is
3:51Can you go next? Sorry.
3:54There's two sides of this. There's the
3:55EVM part and there's the co-processor
3:57part.
3:58The EVM part is very simple. I'm not I I
4:01don't want to pitch, but it's a FHE
4:04library
4:05that you import into your contract. And
4:08then Can you go to the next one? Sorry,
4:09it has good examples.
4:11And then instead of a plus, you now have
4:14to call FHE.add.
4:17And that uses the machine. What this
4:18does is it creates an event that gets
4:21picked up by the co-processor,
4:23and this co-processor executes this FHE
4:25computation
4:27off-chain,
4:28but in such a way and Arturo will tell
4:30you more about this but in such a way
4:32that these two things mirror each other
4:33and link together deterministically.
4:37Once we have this
4:39once we have this stitch into the chain,
4:41we get to start using these FHE
4:44computations to create an ERC 20 or a
4:48different contract that instead of
4:50holding public balances holds a handle
4:54to a confidential balance. And this
4:57confidential balance you can add and you
4:59could subtract. It's program It's
5:00programmatic. It's composable.
5:03And you can build the ERC 20,
5:05but you can build on top of it as well.
5:08Can you go next?
5:12So this is what we did. Um we have FHE
5:14ERC 20 standards. Um
5:17it's called a dual-mode token.
5:20Uh it's an ERC 20 that has an extension
5:22on top of it that has this additional
5:24computational uh layer.
5:27And we wanted to make sure that this was
5:28secure. Uh it's it we
5:31we've all gone through processes where
5:32we want to make sure that people aren't
5:34taking our funds. So we reached out to
5:36diligence and we found amazing auditors
5:39that are willing to Yes.
5:41Amazing auditors that are willing to
5:42come with us on this journey to
5:44understand
5:46what pitfalls do you run into when you
5:48have this new style of system? What
5:50pitfalls
5:52What changes the way that you write a
5:53smart contract?
5:56And what do those changes allow you to
5:58break? Um
6:00>> That's precisely it. Yeah. Um and from
6:03my side, of course, it took a of
6:05changing of these mental models, but
6:07when when it clicked, we were able to to
6:09understand how to secure these systems.
6:11And that's what I hope for you, at least
6:13a bit a tiny bit of this experience when
6:16finishing this this presentation. And
6:18but remind this phrase because it's
6:19really really key to understand what's
6:21going to be going on in the future.
6:23The chain holds the handles, the
6:25coprocessor holds the data.
6:27So
6:29what did the audit taught us?
6:32A confidential contract cannot fail out
6:34loud when manipulating encrypted data.
6:36This might seem very evident for a lot
6:38of you, but let's just go over this
6:40example that's make this idea really
6:43going to make this idea really quick. If
6:44Alice Alice has a confidential balance
6:47and then she decides to transfer
6:51150 tokens from that from that balance
6:54and the transaction reverts,
6:56everyone already knows that her balance
6:57is below 150.
6:59And that's
7:00a lot of confidentiality that's lost
7:02from from her. Of course, her her direct
7:05balance hasn't been hasn't lost the
7:07privacy, but it's way more than what a
7:09confidential
7:10system would want to to release as
7:11information.
7:13So you would think, oh, so that means
7:14that there are no reverts. Everything
7:17has to work correctly from the get-go.
7:19No, we're we're actually going to find
7:20ourselves in plenty of situations where
7:23we would like to we're seeing that
7:24performing this operation,
7:26the current state that that we're in, if
7:28we were to advance this state to a state
7:30post operation,
7:32that state doesn't look good for the
7:34system. That state is it's an unwanted
7:36state. So
7:37we do revert. We just do it silently.
7:40So how would the silent revert look
7:43from from the unchained perspective?
7:46So you can think of the Alice Alice's
7:48balance instead of pointing to a
7:50specific number as in an ERC 20 token,
7:54it would point to this handle,
7:5732-byte hash
7:59handle
8:00that doesn't give us any information.
8:03Now, as Rogue previously described,
8:05this 32-byte handle
8:07in the coprocessor
8:08actually
8:10uh is the key
8:11pointing to an encrypted value. In this
8:13case, it's pointing to the 100. But this
8:15is off-chain. On-chain, we only have the
8:17handle.
8:18And what we know how how would we revert
8:21uh this to the original state? Well,
8:23on-chain you wouldn't really know if
8:24anything reverted because you would see
8:25that after the queued operations,
8:28Alice's new balance points to oh a
8:30different handle.
8:32No information leaked there.
8:33But if we were to decrypt the the value
8:35that this new new new handle is has in
8:39in the off-chain uh system, we would see
8:41that it's actually the same value.
8:44So here you can get a glimpse of of how
8:46the handles work in in tandem with the
8:48with the coprocessor. But just to
8:51really understand it through, let me go
8:53through a code example that I'm sure
8:55most of us us in this room would
8:57appreciate.
8:58How
8:59this this example really would help us
9:01understand specifically how the on-chain
9:03part
9:04works hand in hand with the coprocessor.
9:07So you're looking at trade decrease. In
9:10a regular ERC 20 token, you would expect
9:13in in a let's say underscore update on
9:17uh you would expect some kind of require
9:20statement checking that
9:22hey, has the the account that we are
9:24transferring from enough balance to
9:26actually send out money? Because if not,
9:27we would be basically minting money,
9:29right? Out of thin air.
9:31So this is very much like the the first
9:33line that you see here.
9:35What we're doing is we're calling the
9:37FAT library with a greater than or equal
9:39operation, which is going to return an
9:41EBO.
9:42And this EBO is an encrypted EBO, right?
9:45We from the on-chain perspective,
9:48we don't really know if that EBO is
9:49going to be true or false.
9:51Handles are deterministic. So for that
9:53matter, we can already know at this
9:55state at this point that
9:58the handle is going to be let's say X.
10:01So we just use that handle and we say we
10:04call it success.
10:06Now on the next operation, let's let's
10:08make it as simple as possible. With with
10:10that previous information, if it is
10:12greater than or equal, it it means that
10:15the transactional should be successful,
10:17right? There's enough old value, meaning
10:19there's enough old balance before to
10:21actually perform the transfer of the
10:23delta that's that's leaving the the
10:25account.
10:26And the next line you're going to see
10:28that
10:29that we're queuing several different uh
10:32if uh
10:34FAT operations, right? Calling to to the
10:36FAT library. You're you're going to see
10:38mainly two parts.
10:39This part over here,
10:41which is
10:42what would happen if success was true,
10:44right? If this e bull was true.
10:47Well, we would queue another operation
10:49to the co-processor that goes right
10:51after the the other one,
10:53after the the greater than or equal,
10:55saying please
10:57get us the result of
10:59the old balance minus the amount we're
11:02transferring out, which would be the
11:03outcome of the the final balance of
11:05Alice if everything were to go
11:07correctly, right?
11:08Now, if the transfer should revert, we
11:12want to leave the balance as it was
11:13prior to the to the to the transfer. So,
11:16we're just leaving old value.
11:18And we're going to And finally, we're
11:19getting updated, which is going to be
11:21the the balance of Alice at the end of
11:24the operation. So, if you were to ask in
11:26the future, hey, what's the what's
11:28Alice's balance? It will be that
11:30variable over there. It would be just a
11:32handle.
11:33So, all in all,
11:34you would see that queuing these three
11:36operations uh into the co-processor,
11:39you will end up with
11:41two different states from the unchained
11:43perspective. Unchain, it's not clear if
11:46it was if it the success was
11:49the the transfer was successful or the
11:51transfer was was unsuccessful.
11:54So, again, going back to the the last
11:56phrase, from the unchained perspective,
11:58you only see the shapes of operations.
12:00You don't see the data. It's only the
12:02co-processor where the data gets
12:05manipulated and of of course in an
12:06encrypted manner.
12:09So, we've been talking about handles and
12:11deterministic handles and so on, but I
12:12think there's another important uh I
12:14mean, many of the security researchers
12:16over here are going to think handles.
12:18Okay, so you can get this handle and you
12:20can manipulate the these bytes and maybe
12:23maybe I can put it in a different
12:25function and actually try to use it for
12:28other purposes. For example, if if Rogue
12:30had a a certain uh balance uh a handle
12:33that represented his balance, what if I
12:35got that same exact hash and put it on
12:39my system and try to transfer that
12:41amount out of my of my of my own
12:44balance? That way I would know what what
12:46balance he's holding, right?
12:48Um well, the answer is this obviously is
12:51is thought of about by the Phoenix team.
12:53There's a specific contract that's in
12:54charge of saying
12:56who is the owner of each uh handle,
13:00who's able to manipulate these and who
13:03can actually perform or grant uh
13:06uh allowance to use uh these handles to
13:09other contracts. And this is greatly
13:11important because you can imagine that
13:12in encrypted systems
13:14they it's not about a single user
13:16performing a transfer, but it's very
13:19multi-layered contracts that pass
13:21allowances from one side to the other.
13:23So I would say from a security
13:24standpoint, it's our job to have a very
13:27very clear idea of
13:30what what allowances does this contract
13:33or should this contract hold at this
13:34moment? So these encrypted variables, is
13:36it absolutely necessary that this uh
13:39this contract is able to decrypt this
13:42this value or pass this this uh this
13:45allowance to another contract?
13:50And yeah, um this is the way basically
13:53constructing with these complicated
13:54contracts uh one on top of the other in
13:57a confidential way is how you can
13:59clear numbers on nobody has ever seen
14:01with in an entire market. You can
14:03construct from auction tokens to OTC
14:06markets,
14:07regular tokens, and there's many more
14:08examples to of of different systems that
14:11can leverage this wonderful technology.
14:14>> It's amazing you found all this
14:16Am I on? It's amazing you found all this
14:18without any of those issues in our code.
14:21[laughter]
14:23Uh yeah, just thank you to the diligence
14:25team for doing the audit. Um
14:28it's really interesting to work on
14:31something that's pushing a frontier and
14:35and have another team that gets to look
14:37at it and and find the issues with it.
14:39There's some really interesting things
14:40that we found, especially with
14:42allowances that changed the way that we
14:44built our libraries. Um
14:48we think the FHE is really exciting.
14:50Um
14:51and it's great to have another team that
14:53knows how to look at it securely.
14:55So anyway, sorry, I'm gushing at the
14:56end.
14:57>> It's been a I I
14:58I hope that our passion for for
15:00confidential contracts has touched you a
15:02bit and I urge you all to take a look at
15:04confidential contracts because it it
15:05really is an very interesting topic.
15:07Thank you very much.
15:08>> Thank you. Thank you.
15:09>> [applause]
Source and accuracy details
- Names, organizations, technical terms, code and numbers may be misrecognized.
- Source wording and disfluencies are preserved; no editorial corrections were applied.
- Export contains whole-second cue starts only; cue ends and subsecond timing are unavailable.
- A full caption-track export does not establish that every spoken word is represented.
- Automatic YouTube captions; not human-verified against the audio.
Source export SHA256: 49473aac63de749b9b07c813dc290213ad23b092b9419513abdfdbf3f7e754a6