Using ed25519verify to sign Oracle data

Hi All,

I want to share a new ASC1 article containing a full example of how to use ed25519verify to incorporate data from the outside world (Oracle) on TEAL:

Pablo Yabo


Hi, it was a nice article, thanks!

Have you already requested this new opcode from the Algorand team?
Do you know where we can request new features? (any github repo issue page for this purpose?)

Thanks for the article!

One way to bypass the restriction of the current ed25519verify opcode is to design the oracle slightly differently. The oracle value would be in the note field of a transaction (let’s call it TxO) with a specific sender (let’s call it SndO). This sender SndO signs TEAL script that essentially verifies that the note field is equal to the oracle value.

TEAL allows you to access all the transaction fields of all the transactions in a group of transactions. Therefore, to access this oracle value, you group this transaction TxO with the transaction that needs the oracle value. This latter transaction checks the former transaction is from the correct sender SndO, and read its note value as the oracle value.

See How can I create an Oracle Smart Contract in TEAL? for additional details

1 Like

Hi Fabrice,

Thank you for the response.

The oracle will need to sign the transaction withdrawing the funds which is equivalent to know the TEAL code in some way. What I’d like is to insert a signed data taken from another source that could may now be aware even about Algorand. For example, a sports oracle that signs information about any event. If I agree with someone else to insert the information signed from this source, the information should be just the result with an id of the event and the signature.
Adding the need to sign a transaction is similar to sign the TEAL itself in my opinion.