76 sats \ 8 replies \ @ek 21 Jul 2023 \ parent \ on: Who Wants To Build Sports Betting on Lightning? bitcoin
I am also surprised this wasn't done yet but the bigger goal is prediction markets. I think sports betting is just one type of a prediction market. Not sure about the details though.
So much opportunity just laying there, I think I'm going crazy just from thinking about it, haha
yeah it really does feel like an obvious product that nobody has even touched yet.
prediction markets would be fun, but i believe HODL contracts have a max duration of 7 days, so wouldn’t really be suited to long-term predictions like federal elections.
perfect for sports betting though.
reply
utilizing DLC would allow for those longer term predicition bets.
DLCs were alot of fun to play around with. typical centralization issues with the oracle tho.
reply
DLC would allow for those longer term predicition bets
Not on lightning
Lightning DLCs and hodl contracts have the same problem with HTLC max timeouts being pretty short by default
Many routing nodes won't route a payment if it could lock up their capital for more than 7 days, and if wallets can't find routing nodes willing to do it, they just return a failure
DLCs do allow longer terms on the base layer, but then it's quite common for fees to become a significant portion of your bet size
I doubt very many people will make a $10 wager if the fee is typically more than $0.25
reply
I was wondering about a few things regarding HODL contracts ...
-
HODL contracts and HODL invoices are the same right? I've seen the interview and iirc, you mentioned that no one uses them. But I think RoboSats is just an example where HODL invoices are indeed used (they use it for escrow). Were you not aware of this?
-
For longer durations, why not just use regular payments? Afaict, hodl contracts also depend on the good will of the service so I don't see much of a difference than just paying the service and hoping they refund you conditionally?
-
HODL contracts lock up funds in a channel right? So there is not only the HTLC max timeout issue but also the max HTLC in flight, no?
reply
HODL contracts and HODL invoices are the same right?
No. "Hodl contracts" is the name of a python app I made that uses hodl invoices to emulate an oracle service on the lightning network. Hodl invoices allow a merchant -- Bob -- to programmatically settle or cancel a payment from Alice, but they (Bob) have the private key necessary to do that, so it's fully custodial. Hodl contracts are different. They allow a routing node -- Carol -- to conditionally forward or cancel a payment from Alice to Bob, but the third party does not have the keys to the money (Carol is just a routing node), so she does not have custody of the funds.
you mentioned that no one uses them. But I think RoboSats is just an example where HODL invoices are indeed used (they use it for escrow)
Robosats uses hodl invoices for escrow, but they do not use hodl contracts. As a result, robosats is a fully custodial service. When you enter a contract on robosats, you send your collateral to Robosats, not your counterparty, and they use hodl invoices to conditionally settle or cancel your collateral payment depending on whether there is a dispute. (If there is no dispute, they cancel your collateral payment, thus giving you your money back; if there is a dispute, they settle your collateral payment, thus retaining your money until they can decide whether you should get it back or your counterparty should). But since they have all the keys they need to settle the HTLC, they have full custody of the collateral for the duration of the trade. "Whoever holds the keys holds the coins," and in the case of Robosats, Robosats holds the keys. So yeah, Robosats is a fully custodial service, just like coinbase or binance, but anonymous (and made by a fellow who I personally vouch for because I think he is trustworthy).
For longer durations, why not just use regular payments?
If by "use regular payments" you mean "use the base layer," I agree. Long duration contracts typically involve large amounts, and for large amounts, the base layer works wonderfully. There are no time limits and there are great tools for making conditional payments, such as 2 of 3 multisig, hashlock contracts, and discreet log contracts. But in sporting events the typical wager is $8-$10, and I don't think the base layer is very good for such amounts anymore. That's why I want to do something like a sports betting site on lightning.
If by "use regular payments" you mean "pay your counterparty directly, with no oracle," you can only do that if you fully trust your counterparty. What if you send them $50 for a game that's coming up on Saturday but they just run off with your money even though their team ends up losing? What if your team wins but your counterparty never sends you the money they owe you? Conditional payments are needed here, but the recipient shouldn't determine the outcome because they can't be trusted. Hodl contracts allow a third party who both counterparties trust to determine the outcome without taking custody of the money (because they are just a routing node).
I don't see much of a difference than just paying the service and hoping they refund you conditionally?
I hope you see the difference now. Instead of paying your counterparty directly, pay them through a routing node that will forward or cancel the payment based on the outcome of the game. That's what distinguishes hodl contracts from hodl invoices.
HODL contracts lock up funds in a channel right?
Yes
So there is not only the HTLC max timeout issue but also the max HTLC in flight, no?
Yes
But the max HTLC limit is pretty easy to solve -- just open up another channel. The max HTLC limit is something like 425 htlcs per channel, which seems like a very high number to me, especially because, if they are all in use, that means your service is very popular, so you can probably easily afford to just open up another channel and get 425 more HTLC slots.
reply
Hodl contracts allow a third party who both counterparties trust to determine the outcome without taking custody of the money (because they are just a routing node).
I hope you see the difference now. Instead of paying your counterparty directly, pay them through a routing node that will forward or cancel the payment based on the outcome of the game. That's what distinguishes hodl contracts from hodl invoices.
Ah, yes, all makes sense now!
I did not appreciate the detail with the routing node in the interview enough. :)
Basically, with HODL invoices the oracle and the counterparty is the same entity.
But with HODL contracts, the oracle is a third party (a routing node).
But the max HTLCs in flight thing is pretty easy to solve -- just open up another channel. The max HTLC limit is something like 425 htlcs per channel, which seems like a very high number to me, especially because, if they are all in use, that means your service is very popular, so you can probably easily afford to just open up another channel and get 425 more HTLC slots.
Ahh, interesting, also makes sense!
reply
deleted by author
reply
This comment was featured on This Day in Stacker News.
reply