informalsystems / partnership-heliax

1 stars 0 forks source link

Ignore slashing cur_epoch + 1 dest validator #73

Closed angbrav closed 1 year ago

angbrav commented 1 year ago

This PR addresses #69. It includes a single/simple change: we do not update stake[cur_epoch+1] when slashing the destination validator of a redelegation when an infraction committed by the source validator is processed.

This solution only works under the assumption that pipeline_offset>1, which is the case by default in Namada. Nevertheless, this was not required before.

A drawback is that there is one more epoch to misbehave multiple times with the same tokens.

I've run the Quint simulator and no violation was found. I've run the following experiments:

Furthermore, I have done a protocol analysis. Assume the following:

Q1: can alice withdraw its X tokens without getting slashed?

The above proof sketch proves by contradiction that alice can't withdraw its X tokens without getting slashed.

Q2: can alice be slashed before dest is slashed?

The above proof sketch proves that alice could be slashed before dest only if pipeline_offset=1. This should be fine as we expect pipeline_offset>=2. In any case, it is unclear that allowing the above is a problem.

Q3: can alice unbond the tokens after the infraction is processed but before dest is slashed?

The above proof sketch proves that alice can unbond the tokens after the infraction is processed but before dest is slashed. This is definitely something that was not allowed before the change introduced by this PR. The question now is whether this can be exploited or not.