Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Public conclude method has no checks #87

Open
geoknee opened this issue Jul 25, 2019 · 0 comments
Open

Public conclude method has no checks #87

geoknee opened this issue Jul 25, 2019 · 0 comments

Comments

@geoknee
Copy link
Contributor

geoknee commented Jul 25, 2019

More accurately, the only check is that the channel is not already finalized.

It's therefore trivial to finalize a channel with any outcome I like, and thereby steal other participants' money.

function conclude(ConclusionProof memory proof) public {
_conclude(proof);
}

and

function _conclude(ConclusionProof memory proof) internal {
address channelId = proof.penultimateCommitment.channelId();
require(
(outcomes[channelId].finalizedAt > now || outcomes[channelId].finalizedAt == 0),
"Conclude: channel must not be finalized"
);
outcomes[channelId] = Outcome(
proof.penultimateCommitment.destination,
now,
proof.penultimateCommitment,
proof.penultimateCommitment.allocation
);
emit Concluded(channelId);
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant