Jeremy Rubin's Blog

Here you'll find an assorted mix of content from yours truly. I post about a lot of things, but primarily Bitcoin.

categories: Bitcoin, Shenzhen Journey.

Probabalistic Payments in Bitcoin using OP_SIZE

I designed a mechanism that allows for probabilistic payments in Bitcoin.

The foundation of the mechanism is sane, where it veers out of “sanity” is in the attempts to get it to work well off-chain.

I originally wrote this paper on November 26th, 2015, and circulated it among a few colleagues. I think this is the first use case of OP_SIZE to implement XOR fair coin flipping, although Secure Multiparty Computations on Bitcoin has similar elements and it was discussed on IRC in #bitcoin-wizards that OP_SIZE might enable probabilistic payments, but not specifically.

I am first posting it on my website as of March 11th, 2017.

full text here

Scaling Bitcoin

Part One

I’m honored to be serving as Program Chair for the first ever Scaling Bitcoin in Montreal.

More Info

Returning Home

Shenzhen Adventure Day 51

Well, my travels in Asia are over. What better way to wrap things up than to make tea ceremony with mom and take photos on a shenzhen-selfie stick.

Jasmine Rice Factory Tour

Thailand Adventure Day 38

Note the change of location!

While I was in Thailand visiting my friend there; I had the fortune of being able to visit his family’s rice processing factory. They’re basically the world’s largest Thai Jasmine Rice processing company.

That’s a lot of rice!

Unprocessed rice comes in like this.

Lots of random stuff mixed in…

The junk gets removed in big gravity sifters.

Gravity Sifting

Look at that junk!

The rice is then polished…

An array of polishers.


Then, an electronic separator uses jets of air to eliminate non rice things.

This uses some fancy machine vision to detect rice/non-rice.

The finished products

Shown are two different grades of rice


There is also some cool stuff going on to make sure the rice is of the right quality.



Measures transparency, whiteness, and the milling degree to judge quality.

There were several other tests as well, including an amylose test.

Smell Clock

Shenzhen Adventure Day 30

The smell clock is a device I built for the Shenzhen manufacturing bootcamp. While we were there, we had a challenge to build a prototype on a tight budget. The assignment was to build something that could denote the passage of time.

I decided, while walking around the market, that these little bottle top humidifiers were really cool:

So I knew I had to incorporate them. I walked around the market scoping out prices and couldn’t find them for a good deal. Just when I was about to give up, I found them at a price I could afford – if I recall it was a few dollars a piece, but I needed a lot.

I laser cut a case for each humidifier out of acrylic and opened up each humidifier and attached a wire to trigger the toggle switch.

In order for it to look nice, I needed some good looking bottles, so I hit the grocery store, where I found:

A bicycle built from toothpaste.

I didn’t find any nice bottles, so I ended up using some ugly ones.

The design uses 4x4 grid of individually controllable humidifiers connected to an arduino mega. Each of the bottle is filled with different fragrances.

I ended up running into trouble with the plastic case, so I cut a new one from wood.

And the finished product:

© 2011-2021 Jeremy Rubin. All rights reserved.