grants-program icon indicating copy to clipboard operation
grants-program copied to clipboard

Open Source, Automated, Numeric Oracle

Open lavaxyz opened this issue 1 year ago • 1 comments

Background


Nothing is trustless. We must be aware of our trust assumptions, so that as we build transparent, anti-fragile systems, we can strengthen them over time. If we don’t know our weaknesses, we don’t know where we need to allocate time to make a better system.

As a community, we’ve been very interested in unlocking bitcoin’s potential using oracle technology. However, building systems dependent on oracles still requires trusting the oracles and the servers the oracle runs. This is fine. It’s just a constraint we have to deal with, and there are ways to deal with it.

One of the best ways to distribute trust, and thus make the system more anti-fragile is by increasing the set of oracles a protocol uses. However, being your own independent oracle today requires you to build everything from scratch. This is just not feasible, and this places a big barrier to entry for oracles, thus limiting how many oracles exist today.

Problem


Having multiple oracles is important to decentralize further, but being an oracle today is hard. It requires a ton of development work. This should be easier, so that anyone can be an oracle and help bitcoin.

Furthermore, the existence of many numeric, high-frequency, systematic oracles events will become crucial to realize applications such as loans, derivatives, yield products, etc. To achieve these ends, one must ultimately have an automated process that creates many announcements and attests with programmatic and consistent timing, all while providing a simple API to access and use.

What We Are Building


We want to build an open-source numerical oracle implementation, so that people/teams wanting to be their own oracles can do it without building everything from scratch. By having robust oracle infrastructure, we can build more robust protocols/DLCs and unlock bitcoin’s potential as being the basis of a financial system that is trust-minimized. We want our implementation to be generic over different numerical events (e.g. BTC/USD, TSLA/BTC) and sources (Kraken, Binance, NYSE). Our oracle implementation will enable oracle creators to set up once and mostly forget about it, automatically creating announcements and attestations in the background for various numeric events.

Oracles


What does an oracle do? The oracle determines what event occurred and produces attestations that can be used to influence some bitcoin transaction. You can use multiple oracles as well, and doing so distributes trust.

Scope


Our open-source code oracle implementation will help build the foundation for a robust oracle ecosystem. We want to make it easy for people to run their own oracles that attest to price-feeds. People could use our oracle implementation to provide price-feed data to bitcoin protocols. As we build more functionality for bitcoin, we believe this infrastructure is necessary to make these protocols secure.

Comparison Krystal Bull

Krystal bull (https://github.com/bitcoin-s/krystal-bull) is a fantastic way to manually create DLC announcements and attest to them. It solves the problem for users being able to create one-off oracles for say, the Heat and the Celtics game. However, there is little support for automation—users must manually announce and attest. This does not sufficiently solve the need for systematic automation that a large class of problem require.

This is just not scalable, and it does not solve the need in the market for people to be able to be an oracle for real applications. If any projects (for ex. Arkadiko) want to use DLCs, they have no other option but to rely on Suredbits. Krystal Bull does not enable people to create an oracle that can programmatically announce and attest to price feeds.

Our proposition will enable anyone to create an oracle and programmatically announce and attest to price feeds. This will make it very easy to launch oracles and help make the oracle ecosystem robust. Especially with all the hacks that happen in DeFi because of the lack of a robust oracle infrastructure, I think this is necessary.

Deliverables, Budget, and Milestones


Total Grant Request: $50,000

Our deliverables are:

  1. Open-source oracle implementation

    1. Creation of oracle announcements
    2. Pulling price-feeds and making attestations for those announcements

    Total grant requested: $45,000

  2. Documentation

    1. API Documentation for users that wish to use oracle events (contract makers).
    2. Documentation for developers that wish to build their own oracle provider.

    Total grant requested: $5,000

Total grant requested: $50,000

1 payment after implementation is done

Milestones


Our deliverable is releasing this open-source oracle implementation on github.

Community and Supporting Materials


All Information and Deliverables will be available on our github. We will also open a channel on Stacks Discord for questions/concerns/comments.

Risks


One of the biggest risks regarding any smart contract is that oracle might misbehave. We can minimize this risk by what Lava is building.

Team


Our team is a group of bitcoin developers who want to push the boundaries of what can be done with bitcoin.

Results: https://github.com/lava-xyz/sibyls

lavaxyz avatar Oct 24 '22 05:10 lavaxyz

👋 @lavaxyz Thanks for your application! We will do a pre-review and let you know if we have any immediate questions. In the mean time please refer to our review schedule here for a detailed timeline and response dates. Best, Will

stacks-foundation avatar Oct 24 '22 05:10 stacks-foundation

Thanks for submitting this here @lavaxyz - Since this is just needed for community reference and the grant is complete - I am going to close the issue.

will-corcoran avatar Oct 25 '22 13:10 will-corcoran