Skip to content

Certik Audit Recommendations#151

Merged
brandoniles merged 6 commits intomasterfrom
certik-1
May 18, 2020
Merged

Certik Audit Recommendations#151
brandoniles merged 6 commits intomasterfrom
certik-1

Conversation

@brandoniles
Copy link
Copy Markdown
Member

Exhibit 1-
Remove Orchestrator address initialization in the policy.

Exhibit 2-
Reorder Transaction struct elements to pack values and save storage.

Exhibit 3-
No action. I'm ok with leaving the index in the TransactionFailed event, since risk is minimal and it aids potential debugging.

Exhibit 4-
No action needed.

Exhibit 5-
Removed unnecessary delete call.

Exhibit 6-
Removed transferValueWei parameter in external_call.

Exhibit 7-
Remove dataLength parameter in external_call. Load directly from array's storage.

Exhibit 8-
No action. It doesn't save gas, and I think it's more legible as is.

Exhibit 9-
Renamed transactionsLength to transactionsSize to follow market-oracle repo's convention.

Exhibit 10-
No action needed, since we mitigated Exhibit 2.

@brandoniles brandoniles self-assigned this May 15, 2020
@aalavandhan
Copy link
Copy Markdown
Member

aalavandhan commented May 18, 2020

Looks good. Thanks 👍

transactions[index] = transactions[transactions.length - 1];
}

delete transactions[transactions.length - 1];
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

That's hidden and good to know! we have this delete pattern in multiple places in our codebase.


destination,
transferValueWei,
0, // transfer value in wei
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I thought we already did this when I left a comment for it in the original PR.

@brandoniles brandoniles merged commit 0b717a0 into master May 18, 2020
@brandoniles brandoniles deleted the certik-1 branch May 18, 2020 22:10
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.

3 participants