Inspiration

We were inspired by the rapid takeoff of Bitcoin ordinals and how having infrastructure in place unlocked tremendous innovation across the Bitcoin ecosystem. We felt that if DLCs were more accessible and open to community innovation, many other unforeseen applications would be built, further accelerating the Bitcoin economy.

What it does

DelFi Oracle sends specific data from the outside world to a blockchain (temperature, votes, price) to Bitcoin Blockchain. This data then can be used to make a decision about whether to dispense money and to whom. Our main use case for this hackathon is Prediction Markets, users can bet on the outcomes of various events such as elections, financial markets, or even product launches. The Oracle will fetch real-world data and distribute the winnings accordingly. Here is how it works: Market creators establish a new prediction market event with specific conditions. Participants place bets on the possible outcomes. The Oracle monitors the real-world data source and determines the correct outcome. The funds are released to the winning participants after both parties sign the transaction.

How we built it

We used pure elixir from top to bottom for this suite. The base layer Bitcoin functionality is provided through the Bitcoinex library, to which Sachin Meier has contributed significantly, including writing the Taproot, Schnorr, Public & Private Key, and Adaptor Signature modules.

Next, ExFacto is an Elixir library containing the DLC contract and Oracle logic. This was written by Sachin Meier before the hackathon.

Oraclex is what we have built for the hackathon. It is a fully functional Oracle, upon which arbitrarily complex (or simple!) DLC contracts can be based. Oraclex uses the Phoenix Framework (an elixir-based web framework) for the frontend.

Challenges we ran into

We face a tough set of tradeoffs between convenience and ease of use and privacy and security. We are building our product with the aim of maximizing privacy and security for our users while still making DLCs approachable enough for the average crypto user.

Having multiple parties communicate peer-to-peer to setup contracts conflicts with the typical Web2 Server-Client model. We could have compromised on user privacy by setting up a Coordinator service which would match and coordinate contract setup, but we instead chose to rely on decentralized, private communication rails, including Nostr, to do so. In the future, we may even be able to build in direct TCP communication between users wanting to setup a contract.

Accomplishments that we're proud of

The Oracle is in a working state, and from what I've seen in the Bitcoin space, is the easiest Oracle implementation out there for the non-technical user. I'm excited to package it up and ship a finalized app for people to download and start to run their own Oracles.

We also crystalized what had previously been a large, amorphous vision. I'm looking forward to executing on this more concrete plan over the next several months.

What we learned

This was a great experience for myself (Sachin), to work on a project with teamates outside of a corporate setting. I've had a vision for this suite of tools for quite awhile, and it was exciting to build and get help from a Nuno, front end engineer, a John, business lead, and Shakira, a product manager.

What's next for DelFi - decentralized Oracle network built on Bitcoin

Following the hackathon, we intend to focus on the User app to enable users to find and "wager" events.
Then, we intend to focus on applying these tools to real-world use cases like supply chain management, smart grid energy management, escrow service, and prediction markets which can all easily be used on top of our solution, perhaps evening sponsoring another hackathon on our foundation!

Prediction Markets:

Oracle technology can be used to create decentralized prediction markets, where users can bet on the outcomes of various events such as elections, financial markets, or even product launches. The Oracle will fetch real-world data and distribute the winnings accordingly.

  • Actors: Market creators, participants, Oracle.
  • Process: Market creators establish a new prediction market event with specific conditions. Participants place bets on the possible outcomes. The Oracle monitors the real-world data source and determines the correct outcome. The funds are released to the winning participants after both parties sign the transaction.

Escrow Services:

_Build a decentralized escrow service, where users can safely conduct transactions without needing a third party. The Oracle can monitor the completion of agreed-upon conditions and once met, release the funds to the appropriate party. Can be used for web3 marketing (influencers, ads). _

  • Actors: Buyer, seller, Oracle.
  • Process: Buyers and sellers agree on transaction terms and conditions. Funds are held in escrow by the Oracle. Once the agreed-upon conditions are met, Oracle releases the funds to the seller after both parties sign the transaction.

Supply Chain Management:

A platform for tracking and verifying the origin and journey of products in a supply chain. The Oracle can gather data from IoT devices and sensors to verify the authenticity of products and ensure they adhere to specific conditions (e.g., temperature, humidity). Payments can be automatically released to suppliers once certain conditions are met.

  • Actors: Suppliers, manufacturers, retailers, Oracle.
  • Process: Suppliers, manufacturers, and retailers participate in a supply chain tracking platform. IoT devices and sensors provide real-time data to Oracle, which verifies product authenticity and adherence to specific conditions. Payments are automatically released to suppliers once certain conditions are met and both parties sign the transaction.

Smart Grid Energy Management:

_A decentralized energy market that allows users to buy and sell excess energy generated from renewable sources. The Oracle can collect real-time data on energy production and consumption and determine the best prices for energy transactions, distributing payments between users accordingly.

  • Actors: Energy producers, consumers, Oracle._
  • Process: Energy producers and consumers participate in a decentralized energy market. Oracle collects real-time data on energy production and consumption. Based on this data, Oracle determines the best prices for energy transactions and facilitates payments between parties after both parties sign the transaction.

Built With

Share this project:

Updates