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

Penalty is now burned on revert stake and redeem instead of progress … #668

Conversation

0xsarvesh
Copy link
Contributor

Fixes #662 partially

The penalty is not returned on progress with proof(stake and redeem) instead it is now burned on revert stake and revert redeem.

…Revert also penalty is not returned on progress with proof
@0xsarvesh 0xsarvesh self-assigned this Mar 14, 2019
benjaminbollen
benjaminbollen previously approved these changes Mar 14, 2019
Copy link
Contributor

@benjaminbollen benjaminbollen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@@ -660,6 +614,10 @@ contract EIP20CoGateway is GatewayBase {
redeemerNonce_ = message.nonce;
amount_ = redeems[_messageHash].amount;


// Burn penalty amount. Reentrancy is protected by message bus states.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 great to have put the comment on reentrancy consideration

`CoGateway's token balance ${eip20CoGatewayFinalBalance.toString(
10,
)} must be equal to ${eip20CoGatewayBalance.toString(10)}.`,
`CoGateway's token balance ${eip20CoGatewayBalance.toString(10)}`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same param used here twice, seems incorrect; perhaps FinalBalance?

Copy link
Contributor

@benjaminbollen benjaminbollen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@benjaminbollen benjaminbollen merged commit c3bfe3c into OpenST:release-0.10 Mar 14, 2019
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

Successfully merging this pull request may close these issues.

2 participants