eth-dev-101 icon indicating copy to clipboard operation
eth-dev-101 copied to clipboard

Token channels with challenge period clears out already on first challenge call

Open oberstet opened this issue 7 years ago • 0 comments

I am wondering why the recipient is paid (and the sender refunded with the remainder) already on the first challenge call during the challenge period?

Here: https://github.com/alex-miller-0/eth-dev-101/blob/1b54490bdfcde288129bfc13d41d09cfc40bb9e2/truffle/contracts/TokenChannelsV2.sol#L159

I thought during the challenge period, anyone is allowed to come up with a signed transaction with a higher nonce by calling into Challenge() in the contract, and only if the challenge period is over, anyone can call into Finalize(), and only this function the actually distributes tokens.

If I am getting this all wrong, I would highly appreciate if you could give me some hints. Thanks!

oberstet avatar Mar 15 '18 19:03 oberstet