1 of 22

VeeDo Time-Lock to the Rescue

Yael Doweck

Product & Research at StarkWare

@YaelDoweck

2 of 22

Time-Lock as a Measure to Eliminate MEV

?

3 of 22

Introduction to VeeDo

4 of 22

VeeDo Time-Lock

  • is a delay function
    • Long to compute
  • is its inverse
    • Fast to compute

  • VeeDo is also a VDF for randomness

f(x, T) {

Repeat T times:

x ⇽ (x1/3 + C) mod p

Return (x, T) }

p is a 126-bit prime

1 multiplication ~ 4ns

Sloth [LW 15, BBBF 19]

5 of 22

VeeDo Time-Lock Commitment

  • Commit to a value v
    • Apply inverse f on the value v:
  • Reveal
    • Compute the delay function f on the commitment c:
  • Verify the reveal computation
    • Option 1: compute the inverse function
    • Option 2: a STARK proof attests to the validity of the computation
      • Anyone can verify the proof very fast (logarithmic time)
      • A smart contract can verify and register the result on-chain

6 of 22

VeeDo to the Rescue!

7 of 22

Two approaches:

  1. Time-locks as part of the protocol layer
  2. Time-locks on Ethereum with smart contracts - supported today

8 of 22

Two approaches:

  • Time-locks in the protocol layer
  • Fully supported Time-locks on Ethereum today with smart contracts

9 of 22

Users send commitments to the mempool

Alice commits to value X

Carol commits to value Y

Bob commits to value Z

Mempool

Time-locked X

Time-locked Y

Time-locked Z

Each commitment has an expiration-time (smaller than time-lock delay)

10 of 22

Commitments are included in the blockchain

Miner

Submits a block containing time-locked transactions

Ethereum

Block:

Time-locked X

Time-locked Y

Time-locked Z

11 of 22

MEV is minimized

Miner

Submits a block containing time-locked transactions

Ethereum

Block:

Time-locked X

Time-locked Y

Time-locked Z

Time-locked transaction are ordered on-chain,

MEV is unknown

12 of 22

An operator/s unlocks the time-locks

Miner

Submits a block containing time-locked transactions

Computation Operator

Get time-locked transactions

and reveal them by performing a long serial computation

Ethereum

Block:

Time-locked X

Time-locked Y

Time-locked Z

13 of 22

The operator submits the proof on-chain

Computation Operator

Verifier SC

X is valid=1

Y is valid=1

Z is valid=1

Submits a computation proof

14 of 22

The operator/s submits conditional transactions

Mempool

conditional X

conditional Y

conditional Z

Computation Operator

15 of 22

The miner checks each time-lock computation

Miner

Query condition on X

Query condition on Y

Query condition on Z

Verifier SC

X is valid=1

Y is valid=1

Z is valid=1

16 of 22

Creates a block with the verified values

Mempool

conditional X

conditional Y

conditional Z

Miner

Block:

conditional X

conditional Y

conditional Z

17 of 22

Block is finalized, anyone can verify it

Miner

Ethereum

Block:

conditional X

conditional Y

conditional Z

Verifier SC

X is valid=1

Y is valid=1

Z is valid=1

18 of 22

Block is finalized, anyone can verify it

Miner

Ethereum

Block:

conditional X

conditional Y

conditional Z

Verifier SC

X is valid=1

Y is valid=1

Z is valid=1

Revealed transactions must be in the same order as the time-locked transactions

19 of 22

Two approaches:

  • Time-locks in the protocol layer
  • Fully supported Time-locks on Ethereum today with smart contracts

20 of 22

The operator/s computes the time-locks

Sequencer

List:

Time-locked X

Time-locked Y

Time-locked Z

Sequencer SC

Send a list commitment (hash)

Commitments as calldata

Computation Operator

Get commitments list

and compute time-locks

21 of 22

The operator submits the proof

Logic SC

Computation Operator

Sequencer SC

Verifier SC

Submits the computation proof

Check that the sequence corresponds to the list commitment

22 of 22

Summary

  • Privacy can reduce MEV
  • VeeDo time-lock offers a solution for privacy in the sequencing phase
  • There are multiple schemes to use VeeDo to minimize MEV
    • Miners are the sequencers of time-locked transactions
    • A smart contract stores the sequence