Tokenizing Open Offers on OpenLaw and Ethereum

Ross Campbell
6 min readNov 12, 2019

--

Representing redemption rights to goods or services with an Ethereum token is a fairly intuitive way to show how eCommerce + smart contracts work together nicely 🤝.

Story time . . . 📖 ☕

Let’s imagine I am a bearded craftsman that hermits in Yellowstone National Park (for reasons…🕵️) that builds Very Fancy Surfboards from scraps I collect on my scenic hikes 🏞️.

Folks love their natural look and how they glide over the waves with stoic grace 🏄 ✨. They also fight over them like hotcakes on Black Friday.

Suffice to say, market demands 🍽️.

Now, as a hermit, I don’t have a bank account 🙅‍♂️. But I do have a phone and internet📱. It’s 2019 after all!

So, taking a gander at my options, I decided to flex my cypherpunk inclinations and use the distributed accounting network, Ethereum, and legal dApp software, OpenLaw, to do magick money stuff without writing a single line of code:

<📜 Stamp a Surfboard Store into an Ethereum Token 🏵️>

Essentially, I’d like to make it so I don’t need to talk to anybody to (i) “open” shop online when I have boards to sell, (ii) allow anyone to buy a digital ticket to claim one these Very Fancy Surfboards with the common internet currency, ether (Ξ), and (iii) allow folks to redeem these token tickets for themselves or transfer at leisure to more enthusiastic surfers. . . .

Let’s go:

Step 1: Draft “Offer Token” on OpenLaw

You will need this form, and some ether for gas to pay the Ethereum network to manifest your token (an Ethereum token is essentially a simple accounting program tracking balances across a distribution of addresses).

Pull up the OL smart form ….

See the basic inputs fields and generalized offer language that you can adapt …

Here, I’m going to input my terms of sale for Very Fancy Surfboards:

and just below, I am going to fill out basic details to program the sale and redemption for my personal token that will effectively allow global customers to mint my digital units at a given rate of ether (Ξ )🏵️ and burn the same 🔥 in order to store their redemption requests (all in the same token Ethereum address🤯):

For my tokenized goods, and to reflect 1:1 simplicity, I might go with “1” Token to Redeem Offer

Continuing my example, I am going to mint 1 Very Fancy Surfboard (VFS) token to start as a gift to a lucky supporter to kick some good vibes into my scheme 😊, as well as select to sell these tokens at the rate of 10 VFS per 1 ether (i.e., 0.1 ether to 1 VFS): 💸

After all these fields are completed on the OL deploy form, I’m ready to click “Send Contract” and then sign this transaction on OpenLaw with both my email and Ethereum address IDs like so: ✒️

To finalize my custom token on Ethereum mainnet, all I need to do is click the “Execute” button on the OpenLaw dashboard, which will popup my MetaMask wallet to pay a small network fee and make my VFS manifest in all their digitized glory: 🌈

TX for mainnet VFS deployment

Step 2: Manage “Offer Token” on Etherscan

Well, now that we a token representing our offer, let’s take a look at how etherscan, an Ethereum block explorer that makes it easy to check out our transactions, also provides a direct way for me to start selling tokens and managing customer redemption with a simple dApp included in our deployments, including storing records of fulfillment and customer reviews: 📦

First, let’s take a look at our token by clicking the OpenLaw etherscan confirm link: Ethereum Call Record

which takes us to the etherscan TX confirm:

*behold, VFS summoned from the ether*

We can then just click on the name of our branded VFS token, which allows us to take a look at our basic token dashboard on etherscan:

(so fresh, so clean)

by clicking the ‘writeContract’ tab, we can buy some offer tokens at our set rate of 0.1 ether per 1 VFS: 💰

mischief managed: 🕵️

🤝 0.1 ether to 1 VFS 🤝

Cool. Now let’s get fancy and redeem one of these VFS tokens for the offer detailed in the same token address, legible by clicking the ‘Read Contract’ tab:

📜 open offer stored on Ethereum token 📜

providing contact details on confirming VFS redemption ~📧 ~ so that our hermit knows who to contact about shipping details 🤙//

Our VFS in the minimum redemption amount, “1”, is then promptly burned and cast back to the ether from whence it came . . . 🔥

begone VFS! gimmeh surfboard

now, let’s click back over to ‘Read Contract’ tab and take a look at our registered token redemption, which will track progress of fulfillment for the public to glance over and make sure things are above-(surf)board:

‘redemptions’ tracks all redeemed offer tokens

As you might notice, the fields for “response” and “review” are PENDING and RESERVED, respectively, to reflect unfulfilled status of this redemption ⌛.

Now, let’s say I ship a Very Fancy Surfboard to my customer 🏄. On my end, I will then click on “writeRedemptionResponse” function on the write contract tab:

which updates our redemption tracker like so:

‘responded’ field also switches to ‘true,’ which unlocks review function for redeemer

Our customer can then weigh in on our delivery, if they so choose to keep us honest, and record their response with “writeRedemptionReview” function on the write contract tab:

DONE DEAL!

Check out the Ethereum smart contract ‘factory’ code for offerTokens here, as well as a testnet deployment for practice 🛠️⚡

Reach out to info@openesq.tech if you want to collaborate around this project, or if you are otherwise intrigued by Ethereum tokenization 🎩

--

--