Fairness in Blockchain: An academic insight - Ask me anything

Hi Danny,

things only canā€™t be fair for some definition of fairness. Relative fairness refers to something else, as the term fairness is starting to be overdefined in the consensus literature. Traditionally (i.e., since ca. 2000), fairness means that any request that is send to the validators ends up on the chain within a limited time/number of blocks. This doesnā€™t talk about the relationship of transactions with respect too each other, and is a bit like censorship resilience with performance guarantees. To differ from that, we use the term relative fairness to show that we mean fairness of messages relative to each other, rather than giving an absolute time guarantee.

1 Like

Hi Daigan,
it is designed to be blockchain agnostic, so it could be picked up by other projects (it could even run on Ethererum as a pre-protocol, so that Capser the friendly finality gadget finally gets reunited with his girlfriend). Which does mean we have to keep improving to keep ahead with Vega :slight_smile:

2 Likes

Hi Edd,

good question, and it depends on the consensus layer. If we use tendermint, the fairness protocol and the chain are very similar in terms of assumptions, so it would make a lot of sense to use the same punishment (and staking scheme etc); given that thereā€™s different risk models, this could be done differently though, and (if we want to be extreme) every marketmaker could choose their own fairness validators and their own punishment/staking/whatever scheme. If we run on top of Ethereum, the models would be very different, so weā€™d need to bring our own punishments (just like Casper does).

1 Like

Hi Witold,

for the orders that are in the same block, this is fairly doable - we do know how to generate shared randomness cheaply, so we could generate a random number after the block is scheduled and use that to sort the orders inside that block. Being somewhat randomized about which block a transaction ends up in is a bit more tricky to do in a way that canā€™t be manipulated, but should be possible (within reason).

2 Likes

Anyone I missed or an answer that doesnā€™t fully answer the question ?

1 Like

If I understand correctly this mitigates the ability to front-run but has high enough throughput. What sort of blocktime and trades per second can we expect? And what other benefits does implementing Wendy give?

2 Likes

I really like the reordering idea @Witold

1 Like

Why Wendy the widget?

1 Like

Does this mean youā€™re a big Casper cartoon fan? :ghost:

1 Like

Does this mean youā€™re a big Casper cartoon fan?

Are you not?

Hey! Why do so many DEXs opt for an off-chain order book, yet claim theyā€™re decentralised? Is this a plausible claim?

1 Like

No, they arenā€™t decentralized. Most chains simply donā€™t have the throughput for an exchange. See EtherDelta for real (pre-Vega) DEX speeds.

I didnā€™t say that! :wink: Until now I thought Wendy was based on an acronym or really complex math referenceā€¦ and Iā€™ve just put 2 and 2 together thanks to @klausā€™s context clues.

1 Like

Until now I thought Wendy was based on an acronym or really complex math reference

With @klaus it could go either way

1 Like

Hi Ricardo,

we havenā€™t measured the impact yet, so a (hopefully) competent guess:

  • Throughput should be fairly close to that of the underlying blockchain protocol - Wendy does add some latency, but not a lot of load (thereā€™s some additional signature generation/verifications and a few more multicasts/gossips, but I expect the impact to to be limited). Thereā€™s some scenarios where the impact is bigger - for example, if we use Ethereum 2 as the blockchain and want to use Wendy with 10000 validators, she will probably be a bottleneck. For most realistic settings, this wouldnā€™t be the case though
  • Latency will be more impacted, as thereā€™s additional steps before a transaction can be processed as well as some potential waiting time (there was a question before on that point).

There is no test run yet to confirm that, but for Vega I do expect that the blocktime stays in the area that we can count blocks per second rather than seconds per block (and in either case donā€™t need to count far)

1 Like

Actually, I have to admit that Wendy just introduced me to Casper, so I have some catching up to do here

1 Like

So new competition, find the most complex acronym that fits Wendy!

1 Like

@Ricardo,

as for other benefits - Wendy eliminates a number off issues related to frontrunning, but also rushing (e.g., fairness during a market crash). The other benefit is the flexibility - Wendy works with every blockchain, can be combined with other widgets such as a comitt&reveal, and can differ between different markets - even on the same chain, different orderbooks can all be individually fair without blocking each other, and each can have their own parameters and fairness definitions. One thing weā€™re working on now is to collect more requirements from traders and integrate them (for example, one market could require provably trusted clocks and then go by the time a transaction is sent by the trader rather than seen by the validator, and so on)

1 Like

And that is the end of todayā€™s AMA!:hourglass:

Thank you all for attending and challenging @klaus with a wealth of questions! My particular favourite was the clarity Klaus provided with respect to ā€˜Wendyā€™ and the added latency she may cause to the underlying network. It turns out that this isnā€™t such a large problem provided we have a suitable upper bound on message delay!

Thank you Klaus for taking the time to answer in such depth. I think weā€™ve all learned something new today and I look forward to future research from Klaus and the discussions that will inevitably follow!:blush:

3 Likes

And big thanks to everyone for their great questions (plus some homework I need to do now to do measurements :slight_smile:

3 Likes