tbtc icon indicating copy to clipboard operation
tbtc copied to clipboard

Calculate the cost of an attack on our SPV relay security model

Open mhluongo opened this issue 5 years ago • 6 comments

We should be able to take this, + example difficulty numbers and mining costs today, + a cost per block, and actually project the cost of this attack on a deposit to get a more informed proof weight requirement

In addition to proof weight numbers, we can also get a good idea of max TBTC minting over a given period. Adding a little cross-currency state around proof weight can mitigate that as a bottleneck, but we need numbers to know if that's necessary

Originally from https://github.com/keep-network/tbtc/pull/51#discussion_r268402078

mhluongo avatar Mar 25 '19 13:03 mhluongo

So the main benefit the light relay gives us is that we can calculate ~when fake proof generation started. So if we're 2 hours into an adjustment period, we know a proof with that difficulty must have been created by a) honest miners in that period, b) someone with 50% of the network, or c) someone with x% of the network (but only with probability x%).

As a corollary, for maximum security, we should require longer proofs as we approach the end of a difficulty window. So if we want to be completely robust against 10% of the hashrate, add a header to the req. proof length every 10 headers ;)

prestwich avatar Apr 01 '19 20:04 prestwich

@mhluongo Shouldn't this be part of https://github.com/keep-network/tbtc/milestone/8? As written currently it is not exactly clear why it'd be secure

gakonst avatar Aug 07 '19 06:08 gakonst

Good catch!

mhluongo avatar Aug 07 '19 09:08 mhluongo

I'd like.to change a lot of.this to the.newer.light relay design

prestwich avatar Aug 07 '19 14:08 prestwich

@prestwich do you have any plans for this?

gakonst avatar Aug 15 '19 20:08 gakonst

We're discussing pulling difficulty from the full relay which would be a nice improvement. I'd still like to see a max new deposit capacity per day though... I might be able to take a crack at this while I work on the other parameterization stuff

mhluongo avatar Jan 17 '20 22:01 mhluongo