Dero Virtual Machine
DHEBP

DERO Homomorphic Encryption Blockchain Protocol

Transaction Details

Each transaction consists of 2 parts:

  • Statement: Contains ring members keys, commitments, encrypted balances (this grows linear), basically 4 curve points per ring member.
  • Proof: Grows logarithmically in ring members. For example:
    • 8 ring size proof is only 1997 bytes
    • 512 ring size proof is only 3965 bytes

Ring Size, Tx Size Data

Ring SizeTx SizeStatement BytesProof Bytes
216693281341
422615921669
8311711201997
16450121762325
32694142882653
641149385122981
12820269169603309
25637493338563637
51271613676483965

Build

The build process involves switching to the directory containing the readme file, setting the GOPATH, and running the code using Go (version 1.12.7). The output sample illustrates the creation and successful execution of transactions, showcasing the transfer of funds between sender and receiver accounts, along with the changes in account balances.

  • Switch to directory containing this Readme.md file
  • export GOPATH=pwd
    go run *.go

Note: Developed and tested on Linux, go version 1.12.7

Output Sample

Creating Transaction
I0706 16:05:28.258801   93136 main.go:101] Transferring 10 from sender to receiver (ring size 8) tx size 3117 bytes 
I0706 16:05:28.258810   93136 main.go:102] Total tx size 3117 bytes   (1120 byte statement, 1997 bytes proof)  
I0706 16:05:28.341387   93136 main.go:107] Transfer successful
I0706 16:05:28.343528   93136 main.go:116] Sender Balance 150 - 10 = 140
I0706 16:05:28.343533   93136 main.go:117] Receiver Balance 0 + 10 = 10

Creating Transaction
I0706 16:05:28.568605   93136 main.go:101] Transferring 90 from sender to receiver (ring size 16) tx size 4501 bytes 
I0706 16:05:28.568614   93136 main.go:102] Total tx size 4501 bytes   (2176 byte statement, 2325 bytes proof)  
I0706 16:05:28.680647   93136 main.go:107] Transfer successful
I0706 16:05:28.682788   93136 main.go:116] Sender Balance 140 - 90 = 50
I0706 16:05:28.682792   93136 main.go:117] Receiver Balance 10 + 90 = 100

More about Derohe here: Explaining Derohe