Phantom Proof Attacks via Weaponized Censorship Resistance in Polygon CDK zkEVM

Phantom Proof Attacks via Weaponized Censorship Resistance in Polygon CDK zkEVM · 24 Jun 2026 · 35:29

Thisal De Silva presents his research on a now fixed issue in Polygon CDK zkEVM that could be used to mount a double spend attack, by weaponizing the chain's censorship resistance features. A useful case study for security researchers and rollup builders interested in zkEVM attack surfaces.

Speakers

Topics

From Phantom Proof Attacks via Weaponized Censorship Resistance in Polygon CDK zkEVM, hosted by Ethereum Engineering Group.

Transcript

Hello and welcome everyone. My name is Peter Robinson and this is the Ethereum and AI engineering group meetup. Today we've got Tysol who is going to tell us about an issue with the ZKP technology used in the Polygon ZKVM. So it's an issue which has been fixed. Tysol, that's right, it's been fixed. Yeah, so it's fixed so it's not an issue but it was it does demonstrate a type of issue which is really interesting. So Tysol, before you present your slides, can you please introduce yourself?

>> Thank you Peter. Yeah, so I'm Tysol. Hi everyone. I'm a PhD candidate at Macquarie University. I'm currently in my first year. My research is being funded by the Digital Finance CRC Cooperative Research Centre program. Australian government initiative. I also have an industry partner that is Australia New Zealand Banking Group. It's it's it's a it's very interesting journey so far and I'm looking forward to the coming days.

>> Okay, brilliant. So thank you. So please present your slides and let's see your talk. >> Sure, thank you. >> All right, take it away please. >> All right, thank you Peter. So in a nutshell, in one sentence, what this talk will be about is the Polygon ZKVM has a feature whose purpose is to protect its users from censorship. So throughout this session what I'm going to show you is how that has been turned into a double spend.

So before I begin, I would like to give few thank yous. This is pretty much a group teamwork. Um, so there are a lot of people behind this. Just uh want to acknowledge that uh uh uh the this uh project is being uh under supervised by Professor uh Annabelle McIver from Macquarie University and uh Dr. Dilum Bandara from CSIRO.

And uh there are a lot of people behind this Digital Finance CRC, ANZ Digital Assets team, Anurag Singh, Richard Schroder, Nigel Dobson, Sudhir Boddu, uh Dr. Mark Staples, Elizabeth Rill. So, to the entire team, thank you so much. Um one disclaimer, the views and findings here are the authors' and don't necessarily reflect the views of the DFCRC, ANZ, or the Macquarie University. Uh so, with that, let's get right into it.

So, uh Peter, could you just give me a thumbs up that you can see the slide change? >> Um no, I'm just seeing the first slide still, the title slide. >> How about now? >> Yes, now I can see it. >> Okay, thank you. Um so, why should we care about this? The whole promise of a secure roll-up is that it anchors L2 trust back to L1. So, the L2 post a validity proof, an L1 verifier checks it, and that's it.

You don't have to trust the operator. You just trust the math. That promise, however, reflects on one assumption uh that thing producing the proof and that thing running the chain agrees on what the EVM does. But here's the catch. In certain implementations, uh the prover that produced the proof and the nodes internal uh software components, they could disagree.

Uh to implement two independent implementations of the same EVM and like two implementations of the same spec, they can drift uh on some specific input. So, now normally, when there's a drift, it's we can say it's harmless because uh nodes get to order. But not always. Uh the problem happens uh when you can each uh when you can run the prover bypassing the node.

Uh and that gap could be exploited uh to a double spend. So, the the thing uh the thing that genuinely interests here uh is the mechanism that they use is a protocol feature. Uh which is a safeguard uh which actually uh let the attacker take funds and move away. So, that's kind of the shape of it. Uh let me build it up properly.

Uh first, the normal well-behaved happy path. So, the attack later is obvious by contrast. >> I think you're still on your second slide. >> Uh >> Yeah, Yeah, good. What Now, you yeah, that's good. >> Okay, thank you. Um So, we are looking at a polygon CDK, which the abbreviation stands for chain development kit. It's a tool kit for developing sovereign EVM compatible L2 chains. Those chains come Those Those chains can come in two variations, the roll up and the validium. So, the roll up, you put the uh transaction data as call data in the layer one.

In the validium mode, uh you just put the transaction data on a data data availability committee, uh and that's it. The that distinction doesn't matter for this attack. What matters is that either way, every CDK chain uh shares the same proving system, which is the CK EVM, uh the same bridge, the same egress hatch protocol. Uh so, everything about I'm about to show you applies to both. Uh So, a batch moves through three finality states trusted virtual and consolidated.

Um and I'm going to uh take you through four steps now. So, the first one is sequence. The sequencer orders the transactions into a batch. At this point, it's trusted and we are taking the sequencer's word for it. The second one is execute twice. Now, this is the step to remember. The batch runs through CDK Aragon, uh the go node with an IVVM interpreter, and independently through the executor of the prover side.

Uh two stacks, same batch, and their state roots have to match. Uh this is still trusted state and happened entirely off-chain. Uh third one is prove. The batch is proved now posted to L1. Now it's virtual uh committed on chain but not yet proven. So, the CK prover generates a validity proof, a STARK compressed into a SNARK so that they can uh cheaply verify on layer one. The fourth one is consolidate. The verifier accepts the proof and the batch becomes consolidated. So, this is like true finality and this is the one that matters. Consolidation is the moment the

bridge opens the withdrawal becomes claimable on L1. Now, hold on to two things. The root comparison in step two is the only runtime trust check in uh layer two between the two stacks and the bridge only opens at consolidation. So, the whole attack is just is just get a batch all the way to consolidated which opens the bridge without that step two comparison ever run.

So, now to kind of answer that, we need the egress hash. Now, I want to uh put this clearly, everything on this slide is intentional. It's there for censorship resistance. So, a malicious operator can't just freeze your funds forever. Uh so, there are two permissionless paths. The first one is the force batch in. Say the sequencer is withholding your transaction, you call the uh force batch which emits a force batch event.

Uh think of this as the notice board that starts a timer. So, the force batch timeout give the trusted sequencer a chance to include your transaction if the the sequencer has censored your transaction. However, if the time out expires and then still they haven't done anything, the sequencer hasn't done anything, anyone can call sequence force batch. And put the batch into the virtual state. So, this way the the trusted sequencer can be completely bypassed.

The second one is prove it yourself. So, if the prove itself is unresponsive for some reason, you can run your CK prover on your own infrastructure and then call verify batch with your proof. It verifies that the batch with verifies the batch and then moves to consolidation. So, the critical line is that force batches get no semantic validation on layer one smart contract.

So, the contract checks that your batch has matches what was stored and nothing else. It does not look inside the transactions. So, So, put together like an attacker drive the batch from injection all the way to consolidation on L1 using their own prover. Needing neither the trusted sequencer or the trusted aggregator. So, that's that's the door that the attack is going after.

Yeah, let me just clear this up. It's one second. Yeah. So, the heart of this paper is we define a new vulnerability class, we call it X here. Heterogeneous CKEVM arithmetized root equivalence. So, in plain English, X here is one of one where the prover produces a state that is neither what the EVM spec says nor what the pre-state. It's it's a forbidden third outcome.

So, that forbidden third outcome, framing matters, and I'll come back to that in a moment. First, the let's go through the name because each letter is uh doing some real work. So, heterogeneous, two genuinely different technology stacks have to agree on EVM semantics. One is uh CK SM, zero-knowledge assembly, and C++, and the other is Go, uh the same spec, totally different code. Uh arithmetized because the prover doesn't just run the EVM, it encodes each execution as polynomial constraints. So, a bug here isn't just is not just a software bug, it's a mismatch between the constraints uh except and what the specs require.

Root equivalence, uh when the two stacks disagree, it surfaces a mismatch between their two Merkel roots, and the whole security model assumes those are all very secret. So, X here is a failure of that equivalence. Now, you may wonder why why why a new class? Don't we already have CK bug taxonomies and all that? We do, but existing ones classify bugs in their local effect inside a circuit. So, it's like under-constrained over-constrained that sort of thing.

Um what they don't capture is the systematic consequence of a bug existing in one stack but not the other. The cross-level divergence is actually the the difference and that's the gap that H uh fills. Uh And the reason that forbidden third outcome matters, the prover is built on a prove-anything paradigm. Uh meaning any input either advances the state or leaves it unchanged.

But either way, it produces a valid proof. So, the prover, if even if you give an invalid transaction, should generate a proof, but it should not generate a new state proof. Uh So, H uh breaks that dichotomy. It produces a thing, a state, that's wrong, but also proven. So, uh And also, H uh is specifically about soundness bugs. The prover accepting something that it shouldn't. A bug just makes the prover return a unchanged pre-state.

That's only a denial of service, and we explicitly excluded uh as there's no state-violating state change to exploit. Um So, now that's all abstract. So, let's make it a bit with one real bug. So, we use a finding from uh the Hexens auditing group of the Polygon zkEVM in 2023. It's an RLP encoding discrepancy.

It's uh So, here, the EVM spec mandates canonical RLP. That's just That's exactly one valid way to encode a given transaction. A non-canonical encoding encodings must be rejected, but the prover's wrong. RLP decoder didn't enforce that check. So, look at the two stacks side by side. CDK Erigon running the EVM sees the non-canonical encoding, rejects it.

No state change on on the left. And then, if you go to the right, the CK prover running the wrong accepts it. It executes the transaction and advances the state. And it produces the proof by doing so. So, that's the Excel in one picture. Two stacks, same input, opposite outcomes, and the wrong one comes with a proof. Um and I want to be a bit clear on this that the the status of this bug was reported by Hexens at as I mentioned, was patched now.

We are not claiming a new vulnerability. We are using a known fixed bug to illustrate the class. And the argument we build from here applies to any Excel bug, not just this one. Let me get the right key as all good.

So, here's the attack in four moves. Uh the shape first, then I'll walk you through properly on the next slide. So, first in the attack, you inject uh let's say Alice poses a batch with a withdrawal wrapped in a non-canonical RLP encoding. That's number one. And then number two, you bypass the trusted sequencer because it rejects the bad encoding. She reverts the time out, then sequence it herself, and the batch goes virtual.

Uh number three is you prove it. She runs her own prover, which accepts exactly what the node rejected, and outcomes a phantom proof. She submits it via the verify batches path. Then, the number four, you claim and roll back. The batch comes to consolidation. The bridge pays out on L1. The the honest L2 now has halted because the the two stacks can't agree on the thing. So, the operators' natural uh way to proceed would be to roll it back.

Uh but the L1 has already been paid. So, that's in a nutshell. Let me walk you through step by step now. Should update one second. Yeah, all good. So, this is the same attack, but now I want to walk you through it carefully because the diagram shows every uh shows every actor at once and exactly what each one moves.

Uh so, quick orientation first. The top to bottom Uh, the top two lanes are the attacker, Alice herself, and her own infrastructure, which is running her copy of the prover. The middle lane is L1, the Ethereum contracts. Below that is the honest L2, the node and its synchronizer. Um, and the strip across the very bottom is a state machine tracking the single number, the total uh, supply across both layers, token supply.

Uh, left to right is the time. Uh, full movement. Uh, S1.0, S1.1, 1.2, and its violation. So, So, now let me walk the timeline left to right. So, it begins as an ordinary looking withdrawal. Yeah. So, normal withdrawal, but this is not Alice doesn't just put this to L2 directly. She puts it to the uh, the egress hatch of the protocol. So, she puts it directly to L1.

Uh, call it TX star. Inside it is a perfectly normal bridge withdrawal of W tokens, but she wraps it in a non-canonical RLP. So, a wrongful encoding, okay? Um, so, meaning that the the length prefix of the EVM specs says is illegal now. So, the payload is honest. The envelope is poisoned. That's that's the way to like think of it.

Uh, she submits it and then uh, to the L1. So, now on L1, consensus contract does exactly what it's designed to do. It records the this force batch and it stores its hash. No objection. Uh remember L1 does no semantic validation. It never looks inside that mini block. Meanwhile, uh the honest L2 nodes, the synchronizer notices that okay, now in the L1, there's this force batch which happened.

Then the sequencer actually tries to process the TX star. And then here you can see. So, it tries to process this TX star. Uh but it but it can't because uh it's not the correct thing. So, so the honest stack refuses the refuses the transaction. It does nothing further. So, Alice now uh waits the force batch time out. The sequencer was given its window to include it in the transaction voluntarily and it didn't. Now, the window closes.

Alice calls sequence force batch percent on L1. Uh the contract records it and checks one thing only. It checks whether this matches the previous uh submission of the force batch. And then the batch goes virtual. So, now batch is in virtual state. The sequencer has been completely bypassed and the batch has moved to virtual. Uh That brings us to the S1.1.

Uh she runs her private copy of the uh prover uh over the now virtual batch. And here the divergence bites because her prover's executor accepts the non-canonical encoding. The fault prover, let's say, for the moment. Uh, the very thing that honest node just rejected, it processes the TX star. So, the bridge logic burns W tokens on her L2 account, and exit relief is created for the withdrawal, and the cryptographic engine produces the phantom proof. That's how.

Uh, so, look at what that actually proof actually attests to. The claim is the straight transition from S1.0 to S1.1. And that her balance went down by W. And that her withdrawal message has been queued in the exit tree. Every one of those is true with respect to the prover's arithmetic.

And that is false with respect to the EVM spec, now. And that's the gap of the phantom proof. She submits the proof to L1. The verifier checks it. Looks perfectly fine. Accepts it. And then it's valid. The the local and global exit roots get updated the moment the proof is accepted, and the batch goes to the consolidate state. Now, is in S2, uh, she cashes out. So, basically, she calls claim asset on the bridge, supplying the Merkle proof for the her W exit leaf.

Uh, the bridge verifies that the proof against the exit root. It checks out, and the L1 bridge releases W to her wallet uh, on Ethereum. So, this is the uh the the money out part. And what is the And what is the honest L2 doing now through all of this? Well, the synchronizer can see the new virtual batch. Uh but it cannot process it because its own decoder is still rejects the TX star.

So, the state database can't advance. The nodes are nodes are halted. And that forces a fork ID bump from N to N plus 1. Uh there's no clean way forward. The node can't skip the batch without breaking the hash chain. And it can't process it without accepting the violation. So, the operators do the natural thing. The natural thing would be to they would [clears throat] roll back.

Uh which land us at this violation. Uh the L2 is rolled back before the withdrawal. It's balance restored from TD minus W back to TD. So, as though the TX star never happened, but L1 is untouched. The payout already settled. Now, if we read the bottom uh stripe, uh at S 1.0, the invariant holds. The total EC uh at S 1.1, the phantom proof is accepted.

L2 shows W burned. So, we dropped C minus W uh in transit. At is two the bridge pays out and the book pre-balances basically. So, the the total is back to C. Everything looks fine, but at this violation, the rollback restores this twos uh L2's W without uh undoing the L1 payout. So, the total is now C plus W. Invariant is broken. So, this is the problem. There's an extra W in the system that no one has paid for.

That's the violation traced end to end. The In the next slide, I'm trying to show you from the attacker's wallet perspective. Um So now Yeah, let me get the one second should update. I think it's on the way. Yep. Uh no, this one. This one. Yep.

So, now Now, attacker's balance if if you look at through this slide like from the attacker's balance. So, at start uh zero on L1, W on L2. That's normal. Phantom proof accepted, W burned on L2. So, now it's zero on L1, zero on L2. The tokens are mid-flight through the bridge. So, then bridge pays out on L1. Now, it's W on L1, zero on L2.

Then, the red part uh L2 rollback. And here's the move. The rollback restores L2's as if as if the withdrawal never happened. So, the L2 goes back to W, but the L1 payout has already settled. So, now it's W on L1 and W on L2. So, a double has started with W. Now, they have two Ws. And the extra W didn't come from anyone. No one was uh with debited. It was just created out of thin air.

Uh so, two options actually to recover this. Uh Rollback was the the approach that we showed so far. Uh That would be the approach that would be taken by uh uh an operator most likely. Uh the other one is L2 uh They can uh uh roll the L2 forward. Uh so, accept the spec violation state as a canonical via hard fork on the layer.

But but but this is the thing. That avoids the surplus. Yes, but now your L2 has officially diverged from the EVM spec. So, and every time you do that, you widen the gap between what your chain calls correct execution. So, we are going after verifiable computation. And every time you do that, you uh increase the gap and what the EVM actually says and we call like what that leads to is architectural erosion. So, so, that's the problem. So, there is no loss-free recovery here. Once you are in a violation state, no protocol compliancy sequence of steps uh get you out. You need external

intervention. You need that. So, then uh the last point is so so, putting putting all of this together, uh what we are uh giving is three contributions. One is the class itself, a new vulnerability class for the dual stack CKEVMs. Capturing exploitable divergence between the prover and the node. So, because every Polygon CDK chain shares the this architecture, every CDK chain is in this scope.

Uh Two, the theorem. We prove that it's an instance exploited through a forced batch withdrawal followed by an L2 rollback produces a uh irreducible token surplus, a double spend. Three, the empirical part. We took the pre-patched prover loaded the ROM and the pure files to that. Uh fed the crafted non-canonical RLP transaction, generated a real phantom proof, a valid stark over the state of EVM would reject. Uh The original audit described this, but

they didn't run this, so we did it. Uh Uh so, the broader message would be uh CKEVMs that couples forced transaction inclusion with cross-layer bridges and independent proving over heterogeneous stacks would face similar kind of issues. So, it's a it's kind of a dual stack story. Uh with that, I'm happy to take any questions and uh if you would like to follow up afterwards, uh my email is also in the slide. Thank you very much.

Back to you, Peter. >> Uh yeah, thank you for a great talk and thank you for explaining the problem in so great detail. Um >> My question >> Are there any questions? >> No questions, but I my apologies for being a bit late in logging on. Um, but I would be interested to read the paper. Um, it might have been linked at the beginning. I'm not sure because I missed the first few slides logging on late.

>> Uh, I will email the the data. It's not on the archive yet, uh, but I will email that. Yes. >> Thank you. >> Yeah, so maybe what we could do is you could put it on archive.org or and then once you've got that, you can message me the link to it and then I can change the description of the meetup talk in YouTube. Maybe that's a way of doing it. >> Yes, absolutely, Peter. That sounds good. I'll do that. Thank you. >> Yeah. And as well for those people on the the meetup slack, we can send it in a message on the general channel.

Yeah. >> Yeah. For sure. Yes. >> Yeah. So, I've worked with the people at Polygon and this sort of problem um, was something that I think everyone was concerned about. And any roll-up, like whether it's a ZK roll-up or even an optimistic roll-up, you invariably have two implementations of the EVM and if they depart in any way, shape or form, then there's trouble. So, I think it's amazing that now we've got a someone who's, you know, done the research and showed exactly how it can be exploited. So, I think I really thank you for putting this all together cuz it's something that people have theorized about, but it's nothing like

having a demonstration of how it can really happen. >> Yeah, thank you, Peter. Thanks a lot and thanks for giving me the opportunity to represent here. Uh, yeah. >> No, not a problem at all. Not a problem. I think you've done a great job of explaining it all, so hence the lack of questions. Um, yeah. So, look every So, Tessel, Joanne, and everyone else. So, I mean about 2 weeks time, we've got me doing a talk on AI payments.

So, essentially, if you've got an MC P server, how could you set it up so that rather than people needing to pay a subscription to use your service, and rather than you say just giving it away for free, how could you do a micro payment system. And so, that's that. And then 2 weeks after that, we've got a talk on cross chain. So, more talks coming up. So, look I thank you again, Tessel, for doing a fantastic talk. And I hope everyone has a great week or two. And see you then.

>> Thank you again, Peter. Yeah, have a good one, then. >> Yeah. Okay. Bye-bye. >> Bye-bye.

Related talks