Derivatives and Options
5 messages, 21 to 27 Dec 2021. Started by Jeremy Rubin.
Jeremy Rubin (2), Prayank, email, Thibaut Le Guilly
Hi Devs,
Today's post is on building options/derivatives in Sapio!
https://rubin.io/bitcoin/2021/12/20/advent-23
Enjoy!
Cheers,
Jeremy
Hi Jeremy,
Quoted text (2 lines)
> Wheres the info come from? Well, multiple places. We could get it from a third party (maybe using anattestation chain of some sort?), or there are certain ways it could beself-referential (like for powswap <https://powswap.com>). > Now let’s define a threshold oracle – we wouldn’t want to trust just onelousy oracle, so let’s trust M out of N of them!
Similar approach is used in discreet log contracts for multi oracles. There is even a project for P2P derivatives but it was not used for any real trades on mainnet or further developed. What difference would OP_CTV make in this project if its implemented in Bitcoin? https://github.com/p2pderivatives/p2pderivatives-client
https://github.com/p2pderivatives/p2pderivatives-server
https://github.com/p2pderivatives/p2pderivatives-oracle
Quoted text (1 line)
> Does this NEED CTV?
No, not in particular. Most of this stuff could be done with online signer server federation between you and counterparty. CTV makes some stuff nicer though, and opens up new possibilities for opening these contracts unilaterally.
Nicer? How would unilateral derivatives work because my understanding was that you always need a peer to take the other side of the trade. I wish we could discuss this topic in a trading community with some Bitcoiners that even had some programming knowledge.
Derivatives are interesting and less explored or used in Bitcoin projects. They could be useful in solving lot of problems.
On Fri, Dec 24, 2021, 8:42 AM Prayank <prayank@tutanota•de> wrote:
Quoted text (21 lines)
> Hi Jeremy, > > > Wheres the info come from? Well, multiple places. We could get it from a > third party (maybe using an attestation chain of some sort?), or there are > certain ways it could be self-referential (like for powswap > <https://powswap.com>). > > > Now let’s define a threshold oracle – we wouldn’t want to trust just one > lousy oracle, so let’s trust M out of N of them! > > Similar approach is used in discreet log contracts for multi oracles. > There is even a project for P2P derivatives but it was not used for any > real trades on mainnet or further developed. What difference would OP_CTV > make in this project if its implemented in Bitcoin? > > https://github.com/p2pderivatives/p2pderivatives-client > > https://github.com/p2pderivatives/p2pderivatives-server > > https://github.com/p2pderivatives/p2pderivatives-oracle >
Discussed a bit here https://twitter.com/JeremyRubin/status/1473175356366458883?t=7U4vI4CYIM82vNc8T8n6_g&s=19
A core benefit is unilateral opens. I.e. you can pay someone into a derivative without them being online.
For example, you want to receive your payment in a Bitcoin backed Magnesium risk reversal in exchange for some phys magnesium. I can create the contract with your signing keys offline.
Quoted text (17 lines)
> > > > Does this NEED CTV? > No, not in particular. Most of this stuff could be done with online signer > server federation between you and counterparty. CTV makes some stuff nicer > though, and opens up new possibilities for opening these contracts > unilaterally. > > Nicer? How would unilateral derivatives work because my understanding was > that you always need a peer to take the other side of the trade. I wish we > could discuss this topic in a trading community with some Bitcoiners that > even had some programming knowledge. > > Derivatives are interesting and less explored or used in Bitcoin projects. > They could be useful in solving lot of problems. > >
I have a decent understanding of a bit of the trading world and can answer most questions you have, or point you to someone else who would.
The way a unilateral option would work is that I can create a payment to you paying you into an Option expiring next week that gives you the right to purchase from me a magnesium risk reversal contract that settles next month.
An example where this type of pattern must be used is in conjunction with DCFMP and PowSwap where miners could commit to, instead of just keys, 'trade specs' and an Automatic market maker inside the DCFMP could attempt to match that miner to a counterparty who wants the opposite hashrate hedge. The need to exchange signatures would make this unviable otherwise.
Prayank,
I believe the p2pderivatives DLC application is still under active development here (single oracle): https://github.com/p2pderivatives/rust-dlc
I was once involved in the project in a galaxy far far away but haven't kept up with the project. Also, I'm a few days behind in the Bitcoin Advent Calendar :)
Cheers, -Yancy
On 2021-12-24 17:42, Prayank via bitcoin-dev wrote:
Quoted text (50 lines)
> Hi Jeremy, > >> Wheres the info come from? Well, multiple places. We could get it > from a third party (maybe using an attestation chain of some sort?), > or there are certain ways it could be self-referential (like for > powswap [1]). > >> Now let’s define a threshold oracle – we wouldn’t want to > trust just one lousy oracle, so let’s trust M out of N of them! > > Similar approach is used in discreet log contracts for multi oracles. > There is even a project for P2P derivatives but it was not used for > any real trades on mainnet or further developed. What difference would > OP_CTV make in this project if its implemented in Bitcoin? > > https://github.com/p2pderivatives/p2pderivatives-client > > https://github.com/p2pderivatives/p2pderivatives-server > > https://github.com/p2pderivatives/p2pderivatives-oracle > >> Does this NEED CTV? > > No, not in particular. Most of this stuff could be done with online > signer server federation between you and counterparty. CTV makes some > stuff nicer though, and opens up new possibilities for opening these > contracts unilaterally. > > Nicer? How would unilateral derivatives work because my understanding > was that you always need a peer to take the other side of the trade. I > wish we could discuss this topic in a trading community with some > Bitcoiners that even had some programming knowledge. > > Derivatives are interesting and less explored or used in Bitcoin > projects. They could be useful in solving lot of problems. > > -- > > Prayank > > A3B1 E430 2298 178F > > > Links: > ------ > [1] https://powswap.com > _______________________________________________ > bitcoin-dev mailing list > bitcoin-dev@lists•linuxfoundation•org > https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev
Hi all,
Did someone say rust-dlc? Just kidding, but wanted to mention that indeed it's under active development, supports multi oracle contracts and many other cool things (pretty much everything you can find in the dlc specs)!
Otherwise nice article Jeremy. Maybe you should drop by our monthly DLC spec meeting one of these days. I'm sure everybody would be happy to hear how we could improve the Bitcoin derivatives ecosystem with CTV and what infrastructures or code could be reused from DLCs.
Cheers,
Thibaut
On Mon, Dec 27, 2021 at 7:39 AM yancy via bitcoin-dev < bitcoin-dev@lists•linuxfoundation•org> wrote:
Quoted text (70 lines)
> Prayank, > > I believe the p2pderivatives DLC application is still under active > development here (single oracle): > https://github.com/p2pderivatives/rust-dlc > > I was once involved in the project in a galaxy far far away but haven't > kept up with the project. Also, I'm a few days behind in the Bitcoin > Advent Calendar :) > > Cheers, > -Yancy > > > On 2021-12-24 17:42, Prayank via bitcoin-dev wrote: > > Hi Jeremy, > > > >> Wheres the info come from? Well, multiple places. We could get it > > from a third party (maybe using an attestation chain of some sort?), > > or there are certain ways it could be self-referential (like for > > powswap [1]). > > > >> Now let’s define a threshold oracle – we wouldn’t want to > > trust just one lousy oracle, so let’s trust M out of N of them! > > > > Similar approach is used in discreet log contracts for multi oracles. > > There is even a project for P2P derivatives but it was not used for > > any real trades on mainnet or further developed. What difference would > > OP_CTV make in this project if its implemented in Bitcoin? > > > > https://github.com/p2pderivatives/p2pderivatives-client > > > > https://github.com/p2pderivatives/p2pderivatives-server > > > > https://github.com/p2pderivatives/p2pderivatives-oracle > > > >> Does this NEED CTV? > > > > No, not in particular. Most of this stuff could be done with online > > signer server federation between you and counterparty. CTV makes some > > stuff nicer though, and opens up new possibilities for opening these > > contracts unilaterally. > > > > Nicer? How would unilateral derivatives work because my understanding > > was that you always need a peer to take the other side of the trade. I > > wish we could discuss this topic in a trading community with some > > Bitcoiners that even had some programming knowledge. > > > > Derivatives are interesting and less explored or used in Bitcoin > > projects. They could be useful in solving lot of problems. > > > > -- > > > > Prayank > > > > A3B1 E430 2298 178F > > > > > > Links: > > ------ > > [1] https://powswap.com > > _______________________________________________ > > bitcoin-dev mailing list > > bitcoin-dev@lists•linuxfoundation•org > > https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev > _______________________________________________ > bitcoin-dev mailing list > bitcoin-dev@lists•linuxfoundation•org > https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev >