Please find the amended spec below:
DeTrace contract and DAO on Free TON
Provide a voluntary system to track object pedigree on the Free TON blockchain.
The world needs a reliable way of tracking and verifying objects (products) in a way that cannot be altered or manipulated. Current systems like automobile VIN numbers and objects with serial numbers are subject to attacks.
We start with premium and mid-range bicycles. The same mechanisms can be later applied to anything else that has ownership rights, such as art, motorcycles, watches, and so on.
We also create a DAO (Decentralized Autonomous Organization) smart contract that can handle the issuance, re-issuance, and verification mechanisms in other use cases.
Initial members of the DAO:
Triton Bikes: A leader in the manufacturing of premium bicycles. Makes unique titanium frames with custom assembly. The driving force behind the idea.
Shulz Bikes: Shulz Bikes is the leader in budget-premium segment bicycles. Makes quality bikes that don’t break your bank.
Ton Labs: The principal developer of TON, a founding member of the Free TON community. Will make the bike DeBot and DAO smart contract.
General requirements - tracking
- Should be open-source.
- Should allow a reliable way of registering objects and events related to those objects on the Free TON blockchain.
- Should work with TON Surf and optionally with proprietary apps via embedded TON OS SDK.
- Should promote Free TON to users, customers, peers.
- Web site integration.
General requirements - DAO
- Should be open-source.
- Integration with TON Surf.
- Should allow issuing/re-issuing objects/tracing smart contracts via a ‘root’ entity.
- Should allow administrative operations, including dividend distribution.
DAO percentages define voting and revenue share rights:
- Triton bikes at 37.5%
- Shulz Bikes at 37.5%
- TON labs at 25%
- Will provide the flow of new users of the system
- Exposure from new products
- The new smart contract will attract many new uses for the technology
Plan of action
- Write the DAO smart contract.
- Build the registration/monitoring system based on TON Surf.
- Start registering ownership of bicycles (the first supported object type) on the new system.
- Add the possibility to register spare parts as objects related to bicycles.
- Integrate TON OS SDK into the company websites of Triton and Shulz.
- Bring other industry players to use the system.
Triton + Shulz Bikes spec:
Token distribution schedule
- 50,000 upfront
- KPI#1: TON Labs develops DAO & DeBots, file a progress report, MVP is launched.
- Based on the proposal vote on satisfactory submission of KPI#1 - the next 50,000 is paid out.
- KPI#2: After 3 months of updates and fixes for issues raised on the corresponding GitHub project - a submission if filed
- Based on the proposal vote - the final 50,000 is paid out.
- Additional benefit: for each new wallet created as a direct result of the use of the smart contract the DAO gets 3 Tons.
None of the Free TON founding members are US citizens.
Wallet for receiveing funds:
Introduction - definitions
Bicycle frame - the main element of a bicycle.
Spare parts - everything that is added to the frame forming a bicycle. Includes wheels, fork, pedals, brakes, seats, etc.
Manufacturer - a company/individual that makes the frame or spare parts or assembles the bicycle.
Bicycle dealer - a store that re-sells bicycles and/or spare parts.
Repair shop (service center) - a workshop that does bicycle repairs, sells and replaces spare parts, and performs authorized warranty repairs.
Rider - the person who purchases and uses the bicycle.
A smart contract is a program that exists on the Free TON blockchain that is executed when a special event occurs. Can hold additional records, formatted, or free-form (e.g., free text ‘comment’ fields).
Blockchain transaction - an event that occurs when one smart contract is executed and sends a message to another smart contract.
DAO - Distributed Autonomous Organization. A new type of organization where its users have a say in its operation.
Introduction - Pain points - manufacturers
- Need to have an up-to-date database of bicycles with valid warranty information.
- Need to respond to requests about stolen bicycles.
Introduction - Pain points - users
- Need to keep warranty information current.
- Need a simple way to report a lost or stolen bicycle.
- Need a simple way of establishing warranty and ownership transfers.
Introduction - General notes
The system deals with three groups of users:
- Sellers: manufacturers/dealers
- Repairmen: repair shops, service centers
- Riders: buyers/users of bikes
Each bicycle is a smart-contract on the Free TON blockchain. Its ownership is a special record that is part of the bicycle smart-contract. The smart-contract has the following entry-points/methods:
- Ownership-transfer - a message the seller sends to the buyer
- Ownership-accept - a message the buyer sends to the seller, confirming the physical possession of the goods
- Repairs-done - a message that is a checklist the repairman sends to the user that lists all the work done on the bike
- Repairs-approved - a message the user sends back to the repairman confirming that every item on the checklist was indeed done
- Bicycle-stolen, bicycle-recovered - a message the user sends to the manufacturer to indicate the fact that his bike was stolen/recovered
- Ownership-proof-request - (a-la ‘satoshi test’) a message sent to a user claiming to be the owner of the bike requesting proof of ownership
- Ownership-proof-response - a message the user sends in response to the ‘ownership-proof-request’ message
- Ownership-recover - a special message that the user sends to the manufacturer requesting bike ownership transfer to a new smart-contract. Used in case of loss of keys to the old smart-contract (see details below)
The complete life-cycle of a bicycle (its provenance) can be traced via the Free TON blockchain by inspecting events that have been put on the Free TON blockchain by each group. This is beneficial to everyone:
- the manufacturer can fight fraud by repair shops
- users can prove ownership
Hence our system provides a way of restoring ownership to bicycles even if the user forgets their keys and loses the device with the wallet. An alternative authentication system is used. The user contacts the manufacturer. They request bike frame ownership change from the old custodian to a new one.
We define a ‘root’ smart-contract with a known address that certifies that the smart contracts to be deployed by manufacturers are valid and have been proven correct.
We define a DAO (Distributed Autonomous Organization) as a smart-contract with its own tokens and methods that has the right to operate the ‘root’ smart-contract.
Methods (everything is voted on, al-a multi-sig):
- Dividend approval
- Token issuance (‘DAO governance tokens or shares’)
- Add smart-contract
- Delete smart-contract
- Add new member
DAO will facilitate the creation of projects that are beneficial to the Free TON ecosystem.
Case: Manufacturer onboarding
- Since this is an open platform, anyone can claim to be a manufacturer of bikes or spare parts (brakes, forks, wheels, tires, seat post clamp, derailleurs, etc.). All the other entities choose whom they trust.
- Each Manufacturer needs a Free TON wallet.
- At a later stage, we recommend securing each wallet with a security card holding the keys to avoid loss or misuse of the keys at a later stage.
Case: Bicycle is created, and its information recorded on the blockchain
- We consider the frame to be the main element of a bicycle.
- The unique Bike-ID (Bicycle Identification Number) is embossed/laser-engraved on the frame by the manufacturer.
- A smart contract is deployed for the frame and is added to the blockchain, with relevant manufacturer’s details (date, serial number, specifications).
- The frame manufacturer adds each additional part of the bicycle to the smart contract. The bicycle smart contract can hold a reasonable number of records (hundreds/thousands, not millions). Data can include the original manufacturer details (name, contact details, serial number, warranty details) for each additional part. We do not define data structures. The data is in free-form, may be XML-formatted.
Case: User onboarding - TON Surf user
- The user already has TON Surf. They associate (register) their wallet address with their account at the manufacturer’s website or app. The rest is the same as “has the manufacturer’s app with TON OS SDK”.
Case: User onboarding - Manufacturer’s app with TON OS SDK
- The user downloads the manufacturer’s app with TON OS SDK.
- User registers using the app, and a wallet is created for them. The keys are kept on the user’s device only. In the event the device is lost or stolen, there is no way to recover the keys. There is a special routine to recover ownership (see above).
Case: User onboarding - old-school user
- The user doesn’t have or want any of the above. In this case, all info is kept by the manufacturer (just like currently). However, at any moment, the user can upgrade to a proper Free TON wallet and take possession of their bicycle.
Case: User buys a bicycle
In case the user has registered their wallet address, an ‘ownership-transfer’ message is sent to the new owner’s address.
When the user is in physical possession of the bicycle (receives it in person or via mail), they respond to the manufacturer’s ‘ownership transfer’ message with their own ‘ownership-accept’ message.
A new ownership record is added to the smart-contract.
Now the bicycle is registered to the new user.
Vanity: as an option, the user may put their name/nickname/pseudonym and/or contact info on the blockchain.
Any kind of free-text data can be added to the bicycle smart-contract by the current owner: for example, the tracking number for the postal delivery, special delivery instructions, notes, etc.
Case: Transfer of ownership
- Once the user finds a new buyer for his bile and completes the transaction, they give the new owner their bicycle. They also send an ‘ownership-transfer’ message to the new owner.
- To accept it, the new owner needs to have the TON Surf app, initialized with a wallet address. Once this is done, the new owner sends an ‘ownership-accept’ message to the seller.
- Once this is done, the ownership transfer record is added to the bicycle smart-contract.
Case: Bicycle is stolen
- When a bike is stolen, in addition to filing a police report, the user may also register the event in the bike smart-contract. This is done via the manufacturer’s app or TON Surf, by sending a ‘bicycle-stolen’ message to the manufacturer.
- The ‘stolen’ property cannot be removed from the bike’s record. However, an additional ‘bicycle-recovered’ message can also be sent to the manufacturer, and ‘recovered ‘property added to the bicycle smart-contract.
Case: Check if the bike has been stolen
- A user wants to check the bike’s provenance. They have the make and serial number. They request a search via the app or TON Surf using the data they have.
- All they can see in the smart-contract is a set of ‘ownership-transfer’ records, with no personal data in each - unless a ‘vanity’ record has been voluntarily placed there by previous owners.
- A ‘stolen’ and ‘recovered’ records are publicly visible.
Case: Proof of ownership
- To prove their ownership, the user receives a special message ‘ownership-proof-request’ to which they can reply using the app or TON Surf by ‘ownership-proof-response’. This can be useful, e.g., in case of a non-transferable warranty.
Case: Spare parts replacement
- After performing a spare part replacement, the user may choose to create a free-form record (we suggest XML-formatted but still text only) that holds all the relevant data. This could be useful, e.g., as a timestamp for future warranty claims.
Case: Sale via an authorized dealer
- An authorized dealer is treated as an interim owner. However, the warranty is not affected by the transfer of ownership from the manufacturer to the dealer.
- Upon the sale of the bicycle, the dealer records the event using the smart-contract, to supply evidence for further warranty claims.
Case: Warranty and service issues
- The system does not concern itself with issues of warranty. It only provides the facts - e.g., bike purchase date, spare part replacement date, services performed on a given date, transfer of ownership done, etc.
- It is up to the manufacturer/dealer to honor/refuse the warranty.
- If some work is done on the bike, the authorized repair shop sends a special ‘repairs-done’ message to the user. It is, in fact, a check-list detailing all the work performed by the repair shop. Items on the list may include all the work that was done, spare parts replaced, etc. If the user approves, he responds with the ‘repairs-approved’ message. Only in this case, the manufacturer pays the repair shop for the work done and parts used.
Recovery of ownership. If a user loses control of their device, holding the secret keys to their smart contract, the user can invoke a special procedure.
The user loses their phone and has no backup of their keys.
They get a new phone, install the TON Surf app, and create a new wallet.
They inform the manufacturer that their device holding the keys was stolen via a special message - ‘ownership-recover’ - requesting a new bicycle ownership record.
The manufacturer requests the user to prove they are who they say they are (usually, using email, but other options are possible).
Once satisfied, the manufacturer adds a new ‘ownership-recovery’ (analogous to ‘transfer of ownership’ but separate) record to the bicycle smart-contract, with a special comment explaining that it is, in fact, a recovery, not a transfer of ownership. This could be relevant for cases of non-transferable warranty.