Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NIP-88: DLC oracle announcement/attestation event kinds #1681

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

conduition
Copy link

This is meant to be a scope-reduced version of #919 to allow Discreet Log Contract (DLC) oracle announcements and attestations to be published over Nostr. I've omitted the DLC offer/accept/encrypted messages that are in #919 and instead i'm focusing only on oracle gossip messages, so that oracles can start using Nostr as an interoperable publishing medium for attestation data.

More info about DLCs in general here.

There is upstream work still going on and I don't think we should standardize some of the messages in #919 because the current DLC specs imply the use of ECDSA signatures, without aggregation. The oracle messages though are about as efficient as we can expect them to be, and as oracles form the foundation of a DLC ecosystem they should be prioritized.

Some open questions for those who might find this these events useful:

  • What extra information should we include in tags for better searchability?
  • What are other important use cases for DLC oracles which this event kind format may not cover?

@conduition conduition mentioned this pull request Jan 13, 2025
Copy link

@tvolk131 tvolk131 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for putting this together! One nitpick, otherwise LGTM!

Comment on lines +76 to +78
// optional, if this is a numeric attestation for an asset pair
["n", "BTC"],
["n", "USD"]
Copy link

@tvolk131 tvolk131 Jan 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it beneficial to include this in kind-89 since you can look up the kind-88 announcement using the e tag to get the same data? The use-case for querying announcements by asset pair makes sense, but I don't see the value in being able to query for attestations by asset pair.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought about this as well, but i believe @vitorpamplona wants to use these attestations for displaying current asset prices to users in GUI based on their "trusted oracle" list.

While technically you could do a two-step process as you say - first look up the announcement, then search for the corresponding attestation - it is easier and more efficient to look up attestations by asset, especially if the current price is all you care about.

Otherwise, you'd need to parse the announcements, find one that is supposed to have matured recently, and then find its corresponding attestation event.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

More background in this PR: #1658

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahh makes sense, thanks for the explanation!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants