gnolang / hackerspace

Tinker, build, explore Gno - without the monorepo!
9 stars 5 forks source link

Idea: Oracles managed by a DAO? #3

Open ajnavarro opened 1 year ago

ajnavarro commented 1 year ago

I had an idea and I want to discuss if it makes sense or not:

Oracles are data feeds that bring data from off-the-blockchain (off-chain) data sources and put it on the blockchain (on-chain) for smart contracts to use.

I wonder if that might be possible to be done in Gno being managed in a decentralized way.

Example

Let's say that we have a DAO that is managing the interface for weather data. This DAO is in charge of keeping and updating the weather oracle data structure:

type WeatherOracleRequest struct {
    Lat string
    Lon string
    Units string
}

type WeatherOracleResponse struct {
    DataSource string    

    Lat string
    Lon string
    Timezone string
    Temp int
    TempFeelsLike int
    Humidity int
    Clouds int
    WindSpeed int
    [...]
}

These structures will be used by DAOs interested in creating an oracle service providing weather data.

With contract-to-contract communication, we should be able to create a package or realm that will fetch data from all registered oracles, aggregates them, and give an answer to the user's realm.

To incentivize data correctness, the main DAO realm that is aggregating the responses can keep a correctness ratio per oracle.

Still a lot of corner cases to cover, but in general, what do you think about this idea?

moul commented 1 year ago

I'm excited to further investigate DAO-managed oracles with smart-contracts as the bridge.

While I anticipate a greater role for validators and special nodes in the future through IBC features, I believe a pure-contract-based approach is the way to go for now. Keep exploring!

moul commented 7 months ago

BTW, we should maybe link this issue with @deelawn's recent presentation?

cc @ajnavarro

deelawn commented 7 months ago

Link to presentation