First Derivatives Mark S. Miller (
Mon, 20 Mar 2000 16:39:43 -0800

The following extremely sketchy approximation to something interesting was inspired by an article in the Economist -- a "School's Brief" on Derivatives -- that claimed that all derivatives could be created by repeated composition of only two operators. Rephrasing in my own words:

option(Contract, Price, Deadline) -> Contract

         Forms a new Contract giving the right but not the obligation
         to engage the original Contract, as long as the deadline has
         not yet passed.


forward(Contract, Deadline) -> Contract

         Forms a new Contract to engage the original Contract once the
         deadline has passed.

While the claim that "only two operators are necessary" doesn't seem quite true, it's close enough to raise the issue of a derivatives- -formalism. Such a formalism would hopefully be a protocol built in E to create derivatives as self-enforcing Smart Contracts, in the spirit of the Ode, and tradable within the ERTP framework (or Tyler's suggested successor).

The following isn't really in E or ERTP, but sketches what such a library might look like. Hopefully it is clear enough to stimulate discussion.

Below we generalize forwards (futures) to contingent erights in order to include Idea Futures Markets naturally in the formalism. We likewise generalize options to reservations.

Are there existing derivatives that cannot be formed by composing these operators? What additional operators would allow us to express these as well?

## The conditional eright to 'wanted' should 'question' resolve to 'true'. define contingent(wanted : ERight, question : Promise(boolean)) :ERight {

     define [result, resolver] := PromiseMaker()
     when (question) -> done(answer) {
	if (answer) {
	    resolver resolve(wanted)
	} else {
	    resolver resolve(null)
     } catch problem {
	resolver resolve(problem brokenRef)


## Resolves to true once the deadline has passed define happened(deadline) :Promise(boolean) {

timer resolveAfter(deadline - timer now, true)

## The eright to 'wanted' once the 'deadline' has been reached. define forward(wanted : ERight, deadline : Time) :ERight {

contingent(wanted, happened(deadline))

## The eright (but not the obligation) to get 'wanted' in exchange for ## 'offered' as long as question hasn't yet resolved to true. define reservation(wanted : ERight,

                    offered : Assay,
                    question : Promise(boolean)) :ERight {
     ... see


## The eright (but not the obligation) to get 'wanted' in exchange for ## 'offered' as 'deadline' hasn't been reached. define option(wanted : ERight,

               offered : Assay,
               deadline : Time) :ERight {
     reservation(wanted, offered, happened(deadline))


## A combination of erights provides all the listed erights define combination(wanteds : EList(ERight)) : ERight {


## An alternative of erights provides one of the listed erights define alternative(wanteds : EList(ERight)) : ERight {