
Kirisame Share Net
A Real World decentralized umbrella sharing network built on Sui using QR codes
Demo
About
Kirisame is a decentralized umbrella-sharing system on Sui where you buy an umbrella outright and get a partial refund if you return it. It’s a proof of concept for a fairer way to share real-world goods using smart contracts and market incentives to address the weaknesses of pay-as-you-go rental systems based on fiat. Inspired by the recent weather in Tokyo, I decided to theme the Kirisame project's use case after the self service umbrella rental business model. In metros across the world, you can rent semi-fungible goods like umbrellas and batteries from unmanned stations. These services can be convenient, but have major downsides for users. * Credit card and App moat just to start using the service * Availability of rentable objects can be poor in high demand areas * Rental and pay-as-you go can lead to uncapped unintentional spending * Infrastructure is not shared between competitors. Users have to plan where they return objects * High fees due to high operational expenses required to balance inventory and cover losses * No standardized process for returning defective objects. If you've used any service like this, you'll know the pain of forgetting to return a battery for a day and getting hit with a huge fine. Kirisame solves these problems by flipping the rental model on it's head and using a prorated refund model of ownership. Instead of taking responsibility for a rented object that isn't even your property, Kirisame objects are yours the moment you purchase them until the moment you decide to return them. "Well, why not just buy the object then if you're gonna pay full cost for it?" I have six umbrellas in front of my door right now because I keep doing this. People like us exist. We want the freedom to decide if we want to return something after we've bought it. Only web3 can make that happen. Here are two user stories side by side. Alice is using a certain Japanese umbrella sharing app. Bob is using Kirisame It's raining. Alice needs an umbrella. Alice goes to the closest IK**A station opens the IK**A app on her phone and scans the QR code to take an umbrella. The app charges Alice an initial fee and the clock starts ticking. Alice has implicitly agreed to the terms and conditions and is now in actual debt to an umbrella sharing company until she returns the umbrella to a compatible station. Alice returns the umbrella, and is charged an unpredictable amount based on her usage. It's raining. Bob needs an umbrella. Bob goes to the closest Kirisame station and picks an umbrella and scans the QR code on it. The code opens Kirisame in Slush and asks if he would like to purchase the umbrella for full price. Bob accepts the transaction. The umbrella is his. the umbrella's state is HELD. Bob's money is held in escrow. Bob has a five minute window to inspect the umbrella for any defects. That's fair. They make you do this when you rent a car so you're not liable for existing damage. If Bob finds his new umbrella to be in bad condition, he throws it into the quarantine bin to get a full refund and the umbrella's state is set to QUARANTINED to await trusted attestation from an Admin Bob likes the umbrella. He keeps it for a couple hours and eventually gets tired of it. If he wanted, he could drop kick it and nobody would get mad because it's his. Bob deposits his umbrella into another Kirisame station. This automatically triggers a transaction from the station side that sets the umbrella state to DOCKED Bobs prorated refund is kept in escrow until condition of the umbrella is attested by the station (once a day), or by the next person to use the umbrella. Bob's implicit attestation of the state of the umbrella when he purchased it released the funds from the previous owner. What if Alice loses her umbrella? She would have to contact IK**A customer service as soon as possible and basically beg for forgiveness so they can terminate the contract early. She might not even remember she rented it until the next time she opens the app and sees 7000円 in fees (this really happens) What if Bob loses his umbrella? Bob's prorated refund eventually reaches 0円 and the umbrella object is automatically disabled. The physical umbrella is no longer a part of the system and the QR code becomes invalid. No compounding fees, no customer service calls, no emergency. After all, it's his umbrella. In a country where the only acceptable thing to steal is umbrellas (Japan), Kirisame makes way more sense. "How can Kirisame work without a big company performing essential tasks like collecting and redistributing inventory?" Kirisame is unique because it solves the redistribution issue by allowing normal people to replenish the supply of umbrellas in high demand areas in exchange for a perpetual share of the profit generated! All a supplier needs is an umbrella and a QR code provided by the contract in exchange for a small bond to cover the cost of disposal. Kirisame is a contract built around a constitution that specifies the responsibilities of the actors involved. In the Kirisame system, actors are incentivized to perform their obligations to keep the network running with profit sharing. THE ACTORS Admin The admin is responsible for maintaining the protocol rules, Overseeing stations and periodically collecting umbrellas from the quarantine bin. Admins receive a small cut of the profits to cover this operational expense Supplier Suppliers are responsible for supplying actual usable umbrellas. Suppliers are not liable for the condition of the umbrellas they supply after docking them in stations. The initial supplier bond, and quarantine process keeps suppliers honest. It is impossible to profit from an umbrella until multiple people have used it, so suppliers are incentivized to choose to supply stations that have high demand. We reward these risk-takers by giving them a perpetual share of the profit generated by their umbrellas. Station Stations are envisioned as mostly automatic machines with QR or NFC activated locking mechanisms. As long as it can accept an umbrella, read the code, send a transaction and prevent people from yoinking umbrellas back out of the quarantine bin, they are doing their job. In exchange for periodic physical maintenance, station masters receive a portion of income generated by purchases and returns. User All of the above responsibility was shifted to the operator side to reduce the user's responsibility as much as possible. They own the umbrella after purchase and have the freedom to use it as they please. Admin, Suppliers and Stations are incentivized by profits to provide a usable service. Users are incentivized by not getting wet and getting their refund. This all seems really complicated, but the terms of services for any sharing service is going to be way longer, and way more unfair to the user.
How it's made
Kirisame is built on the Sui chain because the Sui chain is uniquely suited for stateful object based systems that require fine grained access control. Real life umbrellas are assigned an Umbrella object, linked by a QR code. The Umbrella object tracks the supplier address, last docked station, last owner, current state (Created, Docked, Held, Quarantined, Sold, Retired) and holds escrow balances. In Sui, objects can hold balances. It's all really convenient and I can't imagine doing this in Solidity. The contract itself is written in Move, the contract language of Sui. Coming from Rust, I found it to be pretty intuitive and the right level of abstraction without the footguns of Solidity. Functions are gated by capabilities in Move instead of addresses so access control is pretty simple. With only two object types to track, Indexing through GraphQL was pretty simple to implement. I have the frontend server tracking Umbrellas and Stations so clients don't have to ping Sui so much. The dapp uses Slush as the only wallet. Only Sui can be used, but switching to another token like USDC is certainly possible. The frontend is standard React and Vite following the lead of the example project in the Sui repo. The dapp is intended to run in Slush's embedded browser, so aspect ratio is always mobile. There are some limitations to running in an embedded browser that need to be worked around. Saving QR codes must be done by screencap or opening in another browser because Slush lacks permissions for saving to photo reel. QR reading and OpenMaps functionality are third party extensions. QR codes in the demo are displayed on a eink panel with a NFC chip. This is the best solution for me because I don't have a printer. CI and deployment automation is done through github actions and render.com. I have some scripts to keep everything as clean and one-click as possible. The demo for Kirisame is only tested for iPhone. The station and admin panels are not intended to be accessed by users.