Staex VTS - infrastructure to track and invoice vehicles

Staex Vehicle Tracking System (Staex VTS)

The project name is Vehicle Tracking System based on Internet Computer platform.

The goal of this project is to develop trusted, transparent and automatic infrastructure to use, rent and track vehicles by different entities.

Current solution from our partner is centralized. That’s why there is no trust between the vehicle customer and vehicle provider. Telemetry from the vehicle is not transparent. Contracts (agreements) are signed on the paper and still require trust from the entities to our partner because every invoice is produced by our partner on their centralized cloud servers.

Pitch video
Short video demo

Web3 and Internet Computer superpowers

So we want to improve centralized pipeline by utilizing the Internet Computer platform with on-device telemetry signing. We were happy to implement this PoC on the ICP network because it can store large amounts of data on-chain and has a reverse gas model so it will be easier to setup new vehicles. ICP on-chain digital signature verification helps us to store signed and trusted telemetry from vehicles.

Solution details

The solution contains following parts:

  • Data signing: we can trust data because it was signed directly by the vehicle board computer.
  • Decentralized data storage: we can store data with immutability access.
  • On-chain contracts: agreements between entities with their conditions will be stored on-chain so invoice canister can use this trusted data automatically.
  • Decentralized invoice creation: invoice will be produced by canister with on-chain logic. So everyone can see and review invoice logic.
  • Trusted automation: vehicle can receive signed on-chain events from canister to enable or disable some functionality.

How it built

Our platform contains 4 components:

  • canister - our smart contract with on-chain logic
  • gateway - low level RPC API with a possibility to build unique firmware
  • firmware - firmware with embedded private key
  • vts-ui - user interface

Canister

We have implemented our canister using Rust SDK.

We are happy that ICP canister can be implemented as a WASM module, so we are able to use crypto libraries such as k256 to verify vehicle digital signature before applying telemetry to the storage.

As well as a Rust library to work with decimals and a [library to work with time.

To store huge amount of data inside canister we choose to use Stable Structures library allowing our canister storage to grow to gigabytes in size.

Gateway

Staex fleet management software part which is running on the vehicle is thin and doesn’t require a lot of microcontroller resources to gather and sign telemetry data. We did it to provide the possibility for different hardware suppliers to integrate with our software and make hardware cheaper and more reliable. For this we implemented a low level RPC API which is ready to highload operations and is ready to handle thousands of vehicles, we call it Staex Gateway. In its turn this gateway accumulates telemetry requests from the vehicles and proxies them to the Internet Computer.

Also this component is responsible to send notifications to the vehicle provider or customer.

Firmware

This component is responsible to gather information from vehicle sensors, sign this telemetry data and send to the gateway. Using responses from gateway (and gateway has this information from the canister) firmware can turn on or off the vehicle of some of their functionality.

UI

To implement user we choose Vite and Vue as well as different ICP libraries for JS. When build our canister dfx command produces some JS source code so it is easy to establish communication with the canister and use their methods.

Status of the project

Currently we have completed our grant application and Proof of Concept is ready. Next step is to make an hardware integration and to test the platform with our customer.

Resources

  • YouTube: @staex5585
  • LinkedIn staex
  • X: staex_io
  • GitHub: staex-io/vts
  • Discord: CMKZa5f3

Future plans

In the future we want to implement:

  • Vehicle remote diagnostic
  • Availability planning
  • Predictive maintenance

Such features can improve overall experience of the fleet management system.

4 Likes