The past few days, the idea of reviving delphi.market (#337637) hasn't let me go.
The biggest problem is custody: I don't want to run a custodial service; that has become clear to me by now.
At the time, my mAsTeR pLaN was just to add DLCs to Cashu, outsource custody to Cashu mints, and be clear about it. But deep inside, I knew that was retarded and that I wouldn't be able to escape the responsibility to users or law enforcement when the mints go bust, because yes, they are illegally operating even if @calle does not agree or can say so in public (#1264932).
So I looked at Ark, and it looks promising. The biggest issues with Ark are, IMO, the liquidity requirements for VTXO refreshes (refreshing a new VTXO is more expensive for the operator than refreshing a VTXO that's about to expire) and economical unilateral exit (you need to broadcast a chain of transactions to exit, not just one transaction like in Lightning).
However, if:
- the Ark isn't for payments but for a prediction market
- the Ark operator is the market maker
- users can't trade with each other, only with the market maker
- the minimum bet size is high enough
- the VTXO expiry is after the market settles,
as far as I understand, there would be no out-of-round VTXOs that need to be refreshed to minimize trust, and economical unilateral exit is more predictable. Every Ark payment would essentially be a deposit (enter the Ark/market) or withdrawal (exit the Ark/market), and the bet amount would be high enough to cover any exit fees.
To be clear, I take great offense at lying to users, but I still respect @calle (for the same reasons I also respect the team behind Spark): acknowledging the ugly truth of most using custodial services, so we should make them better in terms of privacy, auditability, trust etc. but I am here for non-custodial tech with less compromises.
I'm sure @justin_shocknet and @DarthCoin will now tell me how misguided I am trying to build on Ark, which is why I'm posting this. Don't hold back, please. I'm here for it.
I expect nothing less garbage from you...
What is a non-custodial bet?
When you place a bet at poker or blackjack, and your chips move across the line, then do you still have "custody" of your funds? Are they still "yours" when they move across the line? If you place a bet on horse racing and you have a bet slip, then does the racetrack bookkeeper have custody of your funds?
We've looked into the space of DLC based prediction markets, though haven't fully investigated the potential of using Ark. Long story short DLCs and LMSR doesn't work because the DLC design is extremely inefficient with managing liquidity, so you will need external market makers who are willing to roll with your design and provide liquidity.
But the fundamental question of doing prediction markets in a non-custodial way is whether or not users have custody of their funds after a bet has been placed. If there's no "unilateral exit" where users can retrieve their funds and sell an event contract after it's been placed, then is the setup really non-custodial?
We're interesting in building non-custodial prediction markets on Bitcoin at Glimpse as well, it's just a monumental technical challenge. If you're interesting in building some sort of non-custodial LMSR based prediction markets, then I'd be happy to chat.
Hey, thanks for your interest! Good questions! I hinted at them a little bit with this in my journal:
But let me also reply to your quotes directly:
DLCs make it possible for you to always claim what you win if you win. They also make sure losers can withdraw if the oracle fails to attest. Trust moves from the market operator to correctly resolving a market and not running away with the funds to an ideally oblivious oracle.
Yes, the market maker gates prices, and thus whether you can exit at a better price, but DLCs guarantee contracts at the prices you bought them. If your prediction was correct, you can be sure you’ll get paid, but you can't expect to sell your shares before they go to 0 or buy more. It's a fine but important distinction IMO.
Where?
If people buy conditional DLC-VTXOs, and still have some sats remaining in their wallet balance, then can they do unilateral exit with those sats? And people cannot exit the Ark once they've purchased some conditional VTXO at market price, but they can exit after claiming those DLC-VTXOs?
The reason why I thought DLCs wouldn't be feasible to enable LMSR-based cost function AMMs is due to the amount of liquidity that needs to be committed in advance. In a custodial environment, the LMSR efficiently prices event contracts from the pool of liquidity it already has, but if it's non-custodial, then every payout must be committed in advance.
For example, if someone purchases some contracts with a 100,000 sat payout, then those 100,000 sats need to be committed by the AMM into the DLC for it to be non-custodial. Under that kind of architecture, the volume of the prediction market is bounded by the liquidity available within the AMM to allocate to the DLC payouts. If the AMM runs out of liquidity for payouts, then how can new market participants buy event contracts from the AMM? If the balance of the AMM is 1m sats, then people can trade buy at most 1m sats worth of event contracts before liquidity runs dry.
Regardless of the liquidity, as long as you use an LMSR based mechanism, the AMM operating the prediction market will have bounded loss. It's just if the AMM is operating in a custodial environment, the liquidity can be utilized more efficiently. If it's operating in a non-custodial environment, every payout must be committed into a DLC, and thus AMM liquidity is a constraint.
Have you given any thought to this liquidity constraint under a DLC model? I have been wondering for some time if it's possible to do LMSR based prediction markets on Ark without a DLC type construct, due to this liquidity limitation.
Happy to chat here: https://calendly.com/james-birkeland/30min. Not available this week, but next week I have some time.
You can always use Ark's unilateral exit for your VTXOs, locked with a DLC or not. You cannot exit the DLC contract. Does this make sense? This confused me too, but it's a very nice property.
I definitely see liquidity as a major problem here, but because of Ark, not because of DLCs. I haven't thought much about this yet, though. So maybe I will arrive at the same conclusion later.
Don't have much time myself currently. Will get back to you! I'm also planning to post about this on Delving Bitcoin soon, but with some math and numbers regarding liquidity requirements.
How is the DLC enforceable if anybody can do a unilateral exit from the VTXOs that are stored within the DLC? If it's LMSR based, then the AMM needs liquidity from the losing bets to pay off the winning ones. If people know they're on the losing side of a wager, then what's stopping them from exiting the Ark? Like would they exit the Ark but still be locked into the DLC on-chain somehow?
Yes! Unilateral exit means you broadcast the chain of presigned transactions, so your VTXO turns into a UTXO, but spending this UTXO still requires the correct unlock script. In the case of a 2-party DLC, there would be three ways to unlock it: one for each winner with the correct attestation, and a delayed refund for both. This means the Ark operator as the market operator is still part of the DLC, just onchain now instead of in a VTXO.
Did this help?
I’ve mostly ignored Ark so far. What would the user experience be like for these markets?
How would you deal with the liquidity issues of being the market maker (especially if these have to be higher liquidity markets)?
What kind of minimum transaction size do you foresee?
Me too, until I realized you could maybe build more than yet another wallet with it
Ideally it wouldn’t be me who has to deal with these issues, haha. I currently have no interest in making this a profitable company. I’m a developer, not a CEO. I’m sharing this for feedback and I'm fine with others "stealing the idea". Good execution still requires competence I might not have.
But since I have no illusions about others putting their money into code the author himself hasn’t even put money into, I had the idea of capping the amount of money that can be in a market, and only running one market at a time that also settles quickly. It should be something repetitive and very easy to verify, like the Bitcoin price, but maybe something more exciting.
I still need to do the math, since it depends on a lot of parameters, some of which are configurable, like how many traders share a UTXO, but I’m hoping 10,000 sats will be enough. Claude came up with an estimate of 75,000 sats, though, lol. I hope it used the wrong numbers haha.
How do the shared UTXOs work? New participants can add on to an existing one?
Sorry, I cannot explain Ark better than Elle Mouton
Let me know if anything / what is still unclear after you read it!
Woah! I’m probably understanding that wrong but I think I see why you find it so promising.
Could the entire platform basically operate on one batch, with participants able to allocate their sats freely across markets and allowing new participants by just opening additional rounds?
Even if each market has to be its own batch, it seems like users would sort of preset an upper bound for how much they’re willing to spend in a market, but not have to buy the shares then.
So far, I think so, yes! Ark, the protocol, doesn’t really care about how you lock your VTXOs. The protocol works the same way.
To clarify, an Ark can have multiple batches onchain. If not everyone fits into one batch, you need to create another one. The question is just whether an Ark can support multiple markets without losing efficiency in terms of onchain footprint.
Yes!
Yes! I imagined the first step as entering the Ark. So before you bet, you would deposit money into the Ark that you could withdraw at any time. The only difference is that you couldn’t actually use the Ark to pay other users, only to bet on outcomes.
I read through the journal and I think the Ark plus DLC construction makes a lot of sense for removing custody from the market maker.
What I keep coming back to, though, is the oracle.
If the MVP runs the market maker and oracle as the same party, custody risk is greatly reduced, but settlement truth still has a single trust point. A malicious or compromised oracle could attest to the wrong outcome even if it cannot simply take custody of user funds.
Have you considered eventually using multiple independent oracles with a threshold requirement?
For something objective such as a Bitcoin price market, requiring several independent attestations before the DLC can settle seems like an interesting next step.
I am curious whether that would fit cleanly into the adaptor signature design you are working on, or whether the additional oracle combinations would make the DLC construction too complex.
To me, solving custody with Ark and then reducing oracle trust would make this considerably more interesting.
The interesting trade-off here is that Ark can remove custody without removing market-maker dependence. If users can only trade against the operator, then liquidity and fair pricing become almost as important as the VTXO mechanics themselves. A truly compelling design would keep settlement non-custodial while also minimizing how much pricing power the operator has.
On the contrary, this mostly aligns with what I've said Ark is. A centralized application / closed network. Its perfectly suitable for users trading shitcoins with each other, like prediction contracts.
... But it seems like you're not planning that, rather user-to-maker
Where it gets fuzzy is the other stuff.
Is it self-custodial? In most cases, no.
Will it keep the state off your back for running an unlicensed casino? Probably no
So is using tap leaves better than a regular database? No
Can it power a prediction market? Probably yes, but your goals for that market need to reconsider where it adds value and where it doesn't. I'm not seeing where it does as stated.
If I were architecting it, I'd probably keep your role as an oracle for the DLCs, taking a fee on that, and let an existing Ark operator eat the shit from the state whilst participants trade contracts p2p. A pay-to-post orderbook might work too.