How the Medicis Invented Confidential Rollups
A story of privacy, innovation and love. On a public blockchain.
Imagine it is 1486 and the sense of excitement amongst the court of Lorenzo de’ Medici, the ruler of Florence, is palpable. Lorenzo’s loyal servants are carefully preparing his resplendent mask for the evening’s masquerade ball to celebrate the last days of Lent. With Florence’s most noble and esteemed socialites expected to be in attendance the ball is a highly anticipated event with many relishing the opportunity to remain anonymous behind their beautiful masks.
Lorenzo and his daughter Maddalena are particularly excited this evening. They have a special event planned for their illustrious guests. It is well known across Italy that Maddalena is particularly bright and often helps her father with his business affairs or their friend, Leonardo da Vinci, with his engineering experiments. Whilst Lorenzo’s love for his daughter is infinite she longs for the amorous attentions of another. Maddalena and Lorenzo, along with Leonardo, have devised a plan.
A month prior to the masquerade ball, whilst engaged in a game of chess with Leonardo, Maddalena asked how a chess player initiating a new game by guessing the colour of a pawn hidden in their opponent’s hand could reveal their guess without their opponent knowing and switching the hidden pawns in their favour. “Well, they could discretely whisper their guess into the ear of a trusted third person. Their opponent would be none the wiser.” replied Leonardo. “Ah yes, but what if they want to share their guess further than whispering distance?” asked Maddalena. “Well, they would write it down, place it in an envelope, seal it with wax and deliver their guess to the trusted third person.” Leonardo said. “Ah yes, but what if the person trusted to deliver the envelope took a look inside, shared the guess with the opponent and then resealed the wax? How can the guess remain private?” responded Maddalena. “Leave it to me.” was the only reply Leonardo could give as he triumphantly moved his bishop forcing Maddalena into checkmate.
A fortnight later, sat at their usual chessboard, Leonardo said to Maddalena with a hint of forced casualness “I have solved your privacy problem. I have found a way for your player to simultaneously share and obscure their guess of the hidden pawn’s colour.” “That’s marvellous!” replied Maddalena. Leonardo explained “I have built a device. I call it the Trusted Envelope Envoy, or TEE for short. The beauty of this device is it can be placed in a machine to confidentially process guesses from multiple players and aggregate the guesses to arrive at a single winner.”
Back to the masquerade ball and appearing at the top of the grand staircase Lorenzo announces to his guests the plan that he, Maddalena and Leonardo have devised: if they can correctly guess the number of pearls on his daughter’s necklace before she enters the ballroom they will be rewarded with the first dance of the evening with Maddalena. For eligible bachelors, and some non-eligible bachelors (this is a masquerade ball after all), this generated a great deal of excitement — the opportunity to persuade Maddalena why they are her ideal suitor rather than a rival gentleman at the ball.
The masked guests are ushered into an antechamber where they are invited to write their pearly guess on a piece of paper, fold it, seal it with wax embossed with their family crest then post it into what appears to be a simple wooden box. One member of a small group of guests huddled around the box discussing what ingenious device or devices could be hidden inside tentatively prods and pokes at the box. “Careful what you do to that box,” says Leonardo, walking into the antechamber, “if you break it open the machine will burst into flames destroying itself along with all the envelopes inside and ruining this rather fantastic ball.”
As the last of the masked guests submit their guess Maddalena arrives on the arm of her devoted father Lorenzo, sweeping down the grand staircase. Everybody’s gaze is drawn to the beautiful pearl necklace she is wearing. Meanwhile Leonardo carries his aggregating machine into the ballroom from the antechamber and places it on the high table ready for Lorenzo to receive the notification of the winning suitor. Lorenzo approaches the machine and upon Leonardo’s instruction, lifts a small flap and pulls out a rolled up envelope sealed by the machine in which there is a single wax seal embossed with the family crest of the winning guess. Lorenzo moves over to a blackboard mounted on the wall behind him, breaks open the machine’s envelope and pins up the family seal of the winner alongside the family names of past, and unsuccessful, suitors for Maddalena. With the administration taken care of Lorenzo turns to face the room with a flourish, sweeps his arms wide and loudly announces “The first dance with Maddalena will be enjoyed by Mr. Martini!”.
A short gentleman wearing a simple mask steps forward from the throng of gossiping guests and offers his hand to Maddalena as the quintet strike up a bassadanze score. Naturally the short fellow, who turns out to be a merchant unknown to Lorenzo, impresses Maddalena with his wit and charm and they live happily ever after.
So what has 15th century Italian history got to do with decentralised finance? There are a five hints in the story. Did you find them and decipher the metaphor? If not, let me explain how the story represents privacy on public blockchains and how a privacy protocol called Obscuro achieves it.
What this story of Lorenzo, Maddalena and the short gentleman describes is a simple guessing game for guests at a masquerade ball (hint #1: masked guests represent blockchain participants only identifiable by their wallet addresses). Ideally every guess would be confidential with no risk of tampering. This is what Leonardo’s machine containing his Trusted Envelope Envoy device was able to achieve (hint #2: the Trusted Envelope Envoy device represents a Trusted Execution Environment, or TEE). Without Leonardo’s machine the game would have been open to manipulation and information asymmetry with guesses being peeked at or even discarded to remove a rival suitor from the contest. This is what TEEs have been designed for: processing data confidentially and processing code in a way that protects its integrity by sealing it within a secure area of a central processing unit and memory. Leonardo’s TEE was able to read both the guess at the number of pearls and the family crest on the wax seal in absolute secrecy (he really is a genius!). Any attempts to hack the TEE would result in the total destruction of the data preventing the hacker from gaining an advantage.
The TEE was contained within Leonardo’s aggregator machine into which the masked, and hence not easily recognisable, guests posted their guesses (hint #3: this aggregator machine represents the Aggregator Node in an Obscuro network). The Aggregator Node has many responsibilities including interacting with the TEE to process user transactions (guesses in our story) and storing data used by the TEE. The aggregator machine retrieved the winning wax seal and presented it to Lorenzo in a sealed rolled up envelope (hint #4: this rolled up envelope represents a Rollup, a means to represent the verified transactions in a compressed form). That entire process is conducted in an antechamber analogous to a Layer 2 protocol purpose-built for confidentiality, privacy and scalability, like Obscuro.
Finally Lorenzo pins the wax seal embossed with the winner’s family crest on to a blackboard on the wall (hint #5: this blackboard represents a public blockchain network) and announces the winner. This is analogous to the Layer 2 Rollup being submitted to a Layer 1 network like Ethereum. This marks the end of the guessing game with the winner being selected entirely fairly.
This story of Lorenzo, Maddalena and the short gentleman intentionally simplifies Obscuro to give you just a taster of what to expect. Do read the Obscuro whitepaper to understand the protocol in full. And join the Obscuro community on Telegram, Discord and Twitter to keep up with the latest news and developments.