This was a DePIN Oracle that consumed miner submissions via miner software, which I named Trebuchet. The miner software is in another repository that I'm debating on open-sourcing for personal reasons. However, the miner essentially scanned over Bluetooth LTE Announcements and WiFi Beacon signals and ingested packets that matched the Remote ID / Open DroneID protocol, implemented by the FAA. It would then submit these payloads via an MQTT host with TLSv1.3 encryption, where this Oracle would consume those submissions, do some math on payouts, and handle the economy accordingly.
Regarding the TLSv1.3 encryption, the plan was that certificates for the individual machines would be issued via this Oracle and assigned a "Wallet" -- although, the certs don't care about a wallet for now, just that they match up.
I'm not an economist, I'm a programmer - so the crypto economy in this Oracle may not be the best design ever.
flowchart TD
A[Drone Scanner] -->|Drone Found| B(Publish to MQTT Broker over TLSv1.3)
B --> C{MQTT}
C -->|Consume| D[Payout Queue]
D -->|Number of Payouts > 10| E[Submit Bulk Payouts]
An example bulk payout can be seen here on Solana's devnet: https://explorer.solana.com/tx/3K2gFZMCiv4GFqBNz8P8GfqoAhw2P9Rkp8VaNSnUJAdHgo9rJJw8EVEtEYXZgrbQqQsmfgZdFgTswJKWUB54R5P6?cluster=devnet
This project's code was done by myself while the rest of the project was done by group of people involved in the DePIN (Decentralized Physical Infrastructure Network) world of cryptocurrency. It's basically a way for crypto to be involved in renting or selling equipment out. I honestly just wanted an excuse to dive deeper into Rust and various forms of protocols (Bluetooth and WiFi packet parsing, TLS communication, etc.), and this seemed like a cool project to do it in; however, the team wanted to shift focus from drone mining - mainly because the traffic could be spoofed very easily - and wanted to do a random memecoin.
I did not have time to adjust this codebase after putting hours and hours of work into this during my paternity leave, and I just had twins. However, according to the influencer via a Tweet (I will not name his name out of respect), I flaked out. I reached out to him personally, and received no reply for a number of weeks.
That is why I'm open sourcing this. That and I'm the sole contributor to this codebase, and there was nothing signed preventing me in doing so.
I learned a lot on this project. I want others to learn what I learned - as well as showcase my work, and perhaps receive feedback on my Rust code via an issue if anyone would like to.
- Generate certs (
openssl
required)
make bootstrap_ca
to generate the Certificate Authoritymake bootstrap_server
to generate the server certificate and key, signed with the CA -- this is for the MQTT brokermake bootstrap_client
to generate the client certificate and key, signed with the CA -- this is for the Oracle
- Run the stack with
docker compose up -d
- Send a test message with
make send_message
make solana_devnet
make solana_create_wallet
make solana_fund_wallet
or go to https://faucet.solana.com and do this fordevnet
manually; sometimes the CLI doesn't workmake solana_create_token
make solana_create_token_account
make solana_mint_token
-- optional
You'll modify oracle.yml
with the proper mint_address