Potential Exit Bond Construction


#1

Originally from our research repo: https://github.com/omisego/research/issues/107

The basic idea is to leverage the tx.price and assumes gas cost on challenge (or other interactive game steps) would be more or less consistent. Then we can find the gas needed and times the tx.price as the bond.

As a result: bond = tx.price * challengeGas.

We do find one issue that if miner accept zero priced tx, this would be 0. To mitigate that, we put some min value on bond.

This is not perfect of course but is something better than pure constant. Would like to hear thoughts or any better idea on this.


#2

Side chain block committers will always put up the minimum bond they can. If you allow them to put up a zero bond, they will.

This is no different than a pure constant. If fact, it’s literally identical.

You need to make sure that you’re setting up the bond structure such that it’s impossible for the operator to guarantee receiving funds at the cost of their bond, otherwise there could be a situation were the funds they receive is strictly greater than the funds they would lose and the whole system breaks down. However, so long as you guarantee this, the bond only needs to be a non-zero value; even 1 wei would suffice.


#3

This is no different than a pure constant. If fact, it’s literally identical.

Whenever tx.price is zero or something less than it should be, there must be an ethereum miner willing to take the opportunity cost of mining such tx instead of another. As a result, the attacker might have to cover the opportunity cost for mining such tx. (well…there is a potential cost difference on the opportunity cost here vs the cost to perform challenge so it is not perfect.)

You need to make sure that you’re setting up the bond structure such that it’s impossible for the operator to guarantee receiving funds at the cost of their bond

I am lost here actually. Whoever is acting validly would never lose the bond, the opportunity cost would be some interest rate time to lock the bond in the contract. Meanwhile, I am not really sure why you mentioned operator here. I am guessing you’re talking about the scenario operator mines invalid tx and tries to exit with that, so other users need to challenge (?). However, that is exactly why we want to cover the real challenge cost as much as possible instead of having some constant value. The closer it is to the real cost of challenge, the lesser challenger would give up challenging due to the challenge cost > fund losing.


#4

Unless they’re paid the transaction fee out-of-band. Hence why enforcing a minimum transaction fee like these guys are planning to do is non-sensical.

Oh, were you referring to exits? That wasn’t clear in the OP.

You’re not wrong, but any heuristics are gamable (i.e., exploitable). And solving that problem would be isomorphic to solving transaction fee prediction for Bitcoin or Ethereum. That hasn’t been solved yet, for good reason: it’s impossible to know the future.


#5

Oh, were you referring to exits? That wasn’t clear in the OP.

Ah, yeah the post is about exit bond not transaction fee. I’ve updated the post title to clarify that. Sorry for the confusion.

it’s impossible to know the future.

I totally agree. However, at least with this construction, a challenge that act fast enough can have high chance to use similar gas price, assuming gas price doesn’t fluctuate that much in short time. And the goal would be comparing this with a fixed constant value of bond size to see if this makes it better or not.