-
-
Sponsored Events on the Blockchain
Sponsored Event
In my day job, I’m responsible (among other things) for our efforts to integrate block chain and supply chain. Most of this relies on Smart Contracts. In order to learn more about them, I did a project last year that let me get in-depth.
The idea came about while my wonderful other half was organising a sponsored walk – Museum Marathon Edinburgh. It should be possible to create a sponsored event then manage funds and pledges through a smart contract. Unfortunately, I didn't get the project completed in time but I did manage to build Sponsored Event (possibly my most uninspired project name ever).
This can be used to manage, collect and distribute donations for any kind of charity event – sponsored walk, climb, run, pogo-stick marathon, etc.
No more chasing people for money after the event. No need to worry about how or whether the money makes it to the charity.
This contract also allows cancellation and withdrawal from the event. In that case, the participant's initial sign-up fee is transferred to the receiving charity but any pledges are returned to the sponsor.
Additional information about the event (description, title, images) should be stored off-chain in another database.
I built it almost 12 months ago but just updated it to use the latest version of Solidity. Due to the fast-paced nature of these things, it may or may not still work. Who knows?
Web App Structure
The web app uses
web3.js
to interact with the smart contractSponsoredEvent.sol
. It can also interact with a separate content database to keep as much non-critical data off the blockchain as possible.
Key Concepts
The Event
An event for charity where someone must complete all or part of something. In exchange someone else pledges to give money to a recipient.
The Recipient
The charity or body receiving the funds at the end. They don't need to do anything except have an account capable of receiving the funds.
The Organiser
The person creating the event specifying the name, date, description and designating the account of The Recipient. This account is the owner of The Event.
The Participant
The person actually taking part in The Event. This person signs up for the event and commits to taking part. They are given a unique URL which The Sponsor can use to pledge money. Participants are charged a sign-up fee.
The Sponsor
The source of the funds. This party has promised to donate money to The Recipient if The Participant takes part in The Event. They can include a message along with their pledge.
Cancellation
If the event is cancelled, all pledged money is automatically returned to The Sponsor. Sign-up fees are returned to The Participant.
Withdrawal from the event
If The Participant withdraws, all money pledged to them is automatically available for The Sponsor to reclaim. The participant's sign-up fee is not returned.
Ending the event
The Organiser can mark an event as Ended. This will transfer completed pledges and sign-up fees to The Recipient.
Retrieval of funds
Once the event has ended, The Sponsor is able to reclaim any funds donated to Participants who did not complete the event. The funds are not automatically returned as The Event may not have enough to cover the transaction fees.
Closing the contract
After a period of time following the end of an event, The Organiser will close the event. This will transfer any remaining balance to The Recipient.
Contract Lifecycle
Each Sponsored Event contract starts when The Organiser creates it and deploys it on the blockchain. From that point, The Participants can sign up and The Sponsors can make pledges.
Source
You can get the source on github and deploy it against a test network or run Ganache locally. Whatever you do, don't throw actual money against it. That would be a terrible idea.
-
It's Art, I tell you!
After many years of meaning to do it and not actually doing it, I decided to open an Etsy store. It's not my first online print store. In fact, one of the key reasons I ever learned HTML, CSS and PHP was to build an online store for my artwork back in... 2002? Seriously? Seventeen years ago...?
Anyways... I've put in a few prints so far, mostly from the Octoplural series of paintings although my current favourite is the My Day Flowchart.
I really like how I could tie Etsy together with Printful so the prints are generated on demand rather than me holding a lot of stock which is how we did it back in the olden days...
-
I made a thing. Now what?
Anyone who knows me knows I'm all about solving problems. That's my thing. There's a problem, here are the facts, here's the solution. It's almost always a technical solution.
So when I was presented with the problem of making it easier to make background music for YouTube videos, I built Harmonious Studio.
Technically, its a good solution – it lets you mix individual loopable instruments into a single track. Behind the scenes, it uses a the Web Audio API to manage the individual tracks in the browser and ffmpeg to prepare the final high-quality download.
The question is: what now?
The original plan was to allow others to upload their tracks and create a marketplace for music – basically positioning Harmonious Studio as "Shutterstock for Music". There are several options for this – monthly subscription for unlimited downloads, fee per premium track, fee per download.
There are a few problems with this, however.
1. Free is better
There is a huge amount of free music available online. Every week there's a post on /r/gamedev where a composer gives away thousands of tracks for free. The majority of responses I got from the feedback form I asked for on Harmonious fell into the segment "Yes, I use background music. No, I'd never pay for it".
2. Good enough is good enough
The idea was that content creators would be able to make music to fit their content exactly. However, getting something instantly for free that almost fits is preferable to making something custom that costs time and money. Kind of obvious when you think about it.
3. If it works, keep it
The other piece of feedback I got from YouTubers was that, once they've found a piece of music that works, they're more likely to copy-paste it into the next video than get a new one. Once they've got 3 or 4 'go-to' tracks, they've got everything they need for most kinds of videos.
So... what now?
It's a good technical solution to a problem without a good market. This is usually the point where the insightful entrepreneur pivots and relaunches using the tech in a completely new way. Anyone have any suggestions about how to do that?
-
Harmonious Studio
Some of you might know that my wonderful other half reviews a lot of books on Youtube and that I occasionally make music. So I, naturally, help her on the videos by providing background music for her videos.
After a couple of months of re-recording or remixing existing tracks, I realised the key was that – as a content creator – she wanted to have more control over the music in her videos than just picking one of my existing instrumentals. It occurred to me that not everyone that makes videos, games or podcasts has access to a musician with recording equipment but might want the same kind of control over their music.
There are plenty of royalty-free music sites around but a lot of them suffer from the problem that there are 20,000+ tracks to choose from and you might need to go through a few thousand of them to find the right track.
To solve this, I built my latest project: Harmonious Studio.
A 'set' is a collection of individual tracks built around a single basic loop. To create your individual mix, you pick a set, switch tracks on or off and download a loopable piece of music that can be dragged into whatever you use to create your videos or podcasts. All the tracks in a set work together but different combinations can change a piece from light and happy to dramatic and angry to wistful and relaxed.
Here are a few examples of mixes built from the same set:
For Game Makers
I'm also hoping this is useful for game developers. Fundamentally, it's a way to create lots of variations of music that go well together – some dramatic, some calm, some exciting – these variations can be tied to metrics and areas in a game and smoothly and transparently change with the game's mood and atmosphere.
For musicians
The next phase is to open up the platform to other musicians to enable them to add tracks to an existing set or create an entirely new set.
For now, all tracks are licensed for free under CC-by 4.0 but, if it turns out to be useful, musicians will be able to offer their tracks for sale. Those buying the track will pay a single fee for the mix and the fee will be split between the artists who created the tracks in the mix.
If you're a content creator, know a content creator, have ever thought about being a content creator or even have simply read this far in this post, please check it out and give me some feedback.