ledgerloops / strategy-pit

Testing ground for LedgerLoop strategies
Apache License 2.0
0 stars 0 forks source link

Pegged loops #24

Closed michielbdejong closed 2 months ago

michielbdejong commented 2 months ago

Alice starts a lift by:

michielbdejong commented 2 months ago

So really when Alice tells Bob "I'll give you some AB coin in exchange for some 1 Nonce", she could also say "I'll exchange AB coin against Nonce with you for these rates".

But then you need a way to use/reveal the Nonce in two directions so that's tricky.

Maybe Alice can set up the lift without talking about exchange rates, and then do the same in the opposite direction, and then in a second phase, send out exchange rate negotiations. But it doesn't serve much purpose to set up the hashlock already if there are no explicit commitments yet.

There should be a sort of Voltage message going around the loop, or maybe already in the Probe phase as suggested in ledgerloops/ledgerloops#33

michielbdejong commented 2 months ago

I think a bidirectional hashlock is that it increases, not decreases, the power of the initiator. What might make more sense would be to peg a loop to a well-known unit of value. That way, any attempt to price in the opportunity would have to go via an out-of-band bribe that's not covered by the hashlock.

michielbdejong commented 2 months ago

The advantage of a pegged loop is that every participant can see if it's "fair". By pegging the trustline between two nodes, they divide their share of the pie between them.

This still allows nodes to shift their exchange rates until money flows in the direction they want it to flow in, but now instead of pricing AB against BC, they are:

The initiator could still negotiate a bribe from their incoming neighbour

A variation on pegged loops is the MyCHIPs network where the main software to participate forces the user to denote trustlines in a pegging currency, the CHIP. This means that negotiation on the value of goods already took place and it would be extra obvious (and not allowed by the mainline software) if the initiator would accept a trade at a discount.

michielbdejong commented 2 months ago

The function of the pegging is that it reveals the market maker. If a market maker takes a high cut then everybody else will think they have to chip in extra because the loop is slow. In this case, the loop would speed up if you were to cut the market maker out. But apparently they have some other connections that trust them and this gives them connectivity which they can sell at a markup.

michielbdejong commented 2 months ago

I'll create a new strategy that doesn't use exchange rates, and that will accept any lift if: