Building a Crypto Weed App: Part 5 - But really how much?
Today the prices for weed in Florida, D.C., Nevada, and Cannahome are $314, $282, $236, and $125. Now there's an API that will tell you that.
Recap
This blog documents my journey learning about crypto and new tech through a real world project. Get caught up:
Part 1 - Working Anonymously (first paid post, WIP)
Part 2 - Barebones API: Set up a bare bones Rails server
Part 3 - Going Live: Deploy site to Herkou
Part 4 - Pretty Things: Make site look good and SEO optimized
The problem
The good news is that Matomo has been faithfully tracking visits to cluutch.io since it was setup last week, in Part 4. The bad news is that it didn’t have to work very hard to do its job.
The results from Substack aren’t any better either.
This is not surprising. Despite a title with a bunch of buzz words, the actual product up to now is just a regular REST API. Ultimately, this project is about me learning more about crypto oracles and the darkweb. At this point, I have a choice:
A) Focus on the technology: Dive deeper into crypto and darkweb
B) Focus on the product: Improve product-market fit
At this point, ‘B’ feels like the right path to me. Another important goal of this project is to make something usable and to release weekly. Focusing on the tech will lead to a string of poorly documented proofs of concept that I eventually lose interest in.
The elephant in the room
Every morning, I wake up and go to the websites of the same four cannabis websites and input reference prices into cluutch.io. The mean of these four prices is then calculated and displayed as THE PRICE OF WEED TODAY. Let’s enumerate some of the many, many, many reasons this is flawed.
Different strains have varying
Cannabinoid concentrations: THC, CBD, etc.
Grow conditions: indoor/outdoor, hydro/regular
Quality: Medical, unknown, etc.
Indica vs sativa vs hybrid
Growing origin
Manual process leaves room for human error
Sales: may be quoting products that are never actually purchased
Jurisdiction (of seller and purchaser)
The current methodology fails to take any of this into consideration.
Although cluutch.io has hardly had a handful of visits in the past week, I was able to solicit user feedback from at least one friend I shared the link with. They live somewhere that weed is illegal and scoffed at how low the prices currently being listed are. Three of the daily quotes come from dispensary websites in Colorado, Nevada, and California. The last is coming from Cannahome on Tor.
This resonates with me. As a lifetime weed smoker, at the end of the day, I’m not usually too concerned with what strain I smoke or where it was grown. The pertinent questions are “do I know somebody near me that has it” and “how much is it”.
Cluutch is already answering the second question. This week’s installment will seek to make quotes localized so that it is more meaningful to users.
Establishing the price of weed
Knowing the price of weed comes in three levels of difficulty:
Dispensary website in legal jurisdiction (easy): These clearly list price and are decently reliable technically.
Darkweb (medium): Cannahome requires login and dark.fail is used to track down ever-changing urls. The product attributes are also not well coded, making product harder to find.
Somewhere weed is illegal (hard): Prices not officially quoted publicly.
Decision to outsource
Not only are the four quotes I’m getting every day not sufficient, they are also a non-negligible burden. It takes about 5min to complete the task everyday. Some days I forget and compensate by pulling prices twice the next day (once in the morning, and once at night).
Automating this process would be feasible but laborious. And it wouldn’t require any cool crypto tech. Outsourcing the task using a tool like TaskRabbit, Mechanical Turk, or Fiverr is appealing. But I saw an article recently that made me second guess the ethics of this. Fortunately, the creator featured in this article, Caroline Sinders, built the Technically Responsible Knowledge Wage Calculator which will give me a better sense for if I can afford to crowdsource this work ethically.
Using this tool, I setup several scenarios.
Ideal: Cover all 50 states plus one darkweb website and pull 5 quotes from each location per day, at a 30 cents per task pay rate.
Ambitious: 15 locations / 3 quotes per location / 26 cents per quote
Balanced: 9 locations / 3 quotes per location / 25 cents per quote
Minimal: 4 locations / 3 quotes per location / 29 cents per quote
Each of these scenarios assumes it take 45 sec to complete one quote. After doing this for two weeks, this feels about right for the clearnet. Its probably a little rose colored for the darkweb considering the hoops just to open the website.
$100 per month is all the budget I’m giving myself for this project. So I’ll have to start minimal and work my way up. According to TRK Wage Calculator, I can feel OK about it.
Location selection
A sample of states with different laws on marijuana would be ideal. In practice, getting accurate price information for states where weed is illegal is too hard to tackle right now. Things I considered:
Ask dealers: BUT I do not currently have a network of dealers around the US prepared to send daily price updates #lifegoals
Leverage medical marijuana: BUT
Many of those places do not yet have dispensaries with websites that have listed prices.
They are often closed on the weekend making even phone calls more complicated.
State laws do not often require vendors to report final sales prices.
Ultimately, Nevada, D.C., Florida, and the Darknet have been chosen as jurisdictions to look at. They may not cover the full spectrum of marijuana legalization, but are still a pretty part of the rainbow.
From order of most, to least, regulated juridictions:
Florida
According to NORML, you can get up to 30 years for possession and a year for selling 20g or less of marijuana in Florida. At the same time, medical marijuana is legalized and there are a few online dispensaries.
According to the math above, I can afford three prices per jurisdiction per day. In my experience, these sites are not generally reliable. Inventory goes out of stock, items are shown without price, and sometimes pages fail to load all together. Three primary sites and three backups will be chose for each location.
Moving forward, the price will now also always be the lowest price of pure flower on the first page of the vendor’s results. If an exact ounce is not available, take the correct multiple of price.
Primary
Backup
Trulieve: Destin
Curaleaf: St. Petersburg
FLUENT: Lake Worth
Washington D.C.
Weed is practically legal in many ways in the nation’s capital. But you can still get up to 6 months in jail for posesssion of more than an ounce and five years for distribution.
Primary
Where’s Weed: Hi-life ($140)
Street Lawyer Services ($467)
Takoma Wellness ($240)
Backup
Nevada
According to NORML:
55% of Nevada voters approved Question 2 permits adults who are not participating in the state’s medical cannabis program to legally grow (up to six plants, including all of the harvest from those plants) and to possess personal use quantities of cannabis (up to one ounce of flower and/or up to 3.5 grams of concentrates) while also licensing commercial cannabis production and retail sales.
Primary
Planet 13: Las Vegas ($330)
The Dispensary: Reno ($138)
Reef: Sun Valley ($240)
Backup
Nu Leaf: Las Vegas
Reef: Reno
The Dispensary: Henderson
The Darknet
There are plenty of markets on the darkweb. I use dark.fail to know which ones are working. Cannahome is nice because the product is limited to weed and shrooms. For now, Cannahome is the only marketplace that will be considered. All URLs are relative to whatever onion link used to connect.
Primary
William Shatner: ($155)
Wolf Cola: Reno ($140)
Cali Terps: ($80)
Backup
With all that data, its possible to get a rough comparison of prices for an ounce of weed in the various locations. Not surprisingly, price is correlated with how much government interference there is in the transaction.
Cannahome: $125
Nevada: $236
Washington, D.C.: $282
Florida: $315
Implementation
These are the technical requirements to support the new data we want to capture. Links are provided to Github work. I didn’t have time to write helpful narrative. Here is the PR for all of the work in this part.
All work to be done under api.cluutch.io/v2
Create jurisdiction: [github]
$ rails g scaffold v2/jurisdiction name:string
name (string)
has_many (quotes)
Create v2 quote: [github]
$ rails g scaffold v2/quote date:date vendor_name:string vendor_url:string vendor_branch:string is_primary:boolean price_per_ounce:decimal v2_jurisdiction:references
belongs_to (jurisdiction)
date (date)
vendor_name (string)
vendor_url (string)
vendor_branch (string)
is_primary (boolean)
price_per_ounce (decimal)
Lockdown controllers with HTTP auth [github]
Split each existing quote into four individual entries (market1=>NV, market2=>Colorado, market3=>California, market4=>Cannahome) [github]
Add view for calculating average prices grouped by jurisdiction:
rails g scenic:view v2_avg_prices [
github
]
Add toggles to UI based on jurisdiction [github]
Update doccumentation for v2 API [github]
What’s next
This week’s work added two important functionalities: 1) localized pricing, and 2) disagregated quotes.
As of today, I’m still manually looking up prices everyday and inputting them into the website using the CRUD pages behind HTTP auth. I’ll give it another few days with the newer process before deciding if I really need to get support with that part.
I feel confident with this fidelity MVP for now. Next week, we’ll tackle something more technically challenging. Probably either deploying to Tor or starting to work on the crypto oracle side.