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

Sprint 1 poc #14

Merged
merged 138 commits into from
Oct 31, 2023
Merged

Sprint 1 poc #14

merged 138 commits into from
Oct 31, 2023

Conversation

Benjimmutable
Copy link
Collaborator

No description provided.

if (!Strings.equal(sourceAddress, rootERC20BridgeAdaptor)) {
revert InvalidSourceAddress();
}
if (data.length == 0) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we want to check if data.length > 32 here, so that we can throw a meaningful error in this case?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

_deposit(rootToken, receiver, amount);
// invariant check to ensure that the root token balance has increased by the amount deposited
// slither-disable-next-line incorrect-equality
if (rootToken.balanceOf(address(this)) != expectedBalance) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

There is a finding in the last ToB audit that this invariant check could fail for non-standard ERC20 tokens that take a percentage fee. Do we want to account for this? https://github.com/trailofbits/publications/blob/master/reviews/2023-08-immutable-securityreview.pdf

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Thanks for bringing that up. Discussion started in slack

Copy link
Collaborator

@ermyas ermyas left a comment

Choose a reason for hiding this comment

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

LGTM!

@Benjimmutable Benjimmutable merged commit 57cb487 into main Oct 31, 2023
3 checks passed
@Benjimmutable Benjimmutable deleted the sprint-1-poc branch October 31, 2023 01:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants