Oracle Commitments
Glittr contracts can require an oracle commitment to verify an off-chain agreement. Oracle commitments can be leveraged in any contract type, and serve as a modifier to that contract. There is a liveness assumption on part of the designated oracle signer, as these commitments are pre-signed and included directly in the Glittr transaction. They are not PSBTs, the agreement is arranged before the transaction is submitted to the Bitcoin mempool. This allows users to remain in full control - if an oracle provides a price they think is invalid, they can simply choose not to broadcast the transaction.
When adding an oracle block to a contract, the following arugments are needed:
The expected public key of the oracle
The arguments that are expected
Arbitrary arguments are listed as their data types e.g. {int, int}. The values of these arguments are then included in contract calls.
Some arguments are predefined and will be generated by validators, e.g. BLOCKHEIGHT. These arguments may have additional parameters, e.g. block height allows for slippage
When adding this commitment to a transaction, the app will concatenate the expected arguments and sign. A Schorr signature is included directly in the The validator can then concatenate the provided arguments with any generated arguments and verify the provided Schnorr signature against the expected public key.
Last updated