{"id":383,"date":"2022-07-25T12:00:20","date_gmt":"2022-07-25T10:00:20","guid":{"rendered":"https:\/\/ackeeblockchain.com\/blog\/?p=383"},"modified":"2022-12-14T23:45:10","modified_gmt":"2022-12-14T21:45:10","slug":"axelar-ethereum-contracts-audit-summary","status":"publish","type":"post","link":"https:\/\/ackee.xyz\/blog\/axelar-ethereum-contracts-audit-summary\/","title":{"rendered":"Axelar: Ethereum Contracts\u00a0Audit Summary"},"content":{"rendered":"<p class=\"p1\">Between <strong>July<\/strong><b> 4 and July 12, 2022<\/b>, <a href=\"https:\/\/axelar.network\/\">Axelar<\/a>\u00a0engaged\u00a0<a href=\"https:\/\/ackeeblockchain.com\/\">Ackee Blockchain<\/a>\u00a0to review and\u00a0<a href=\"https:\/\/ackeeblockchain.com\/blog\/glossary\/audit\/\">audit<\/a> changes on several Ethereum contracts. The entire audit process was conducted with a total time commitment of<b>\u00a05 <a href=\"https:\/\/ackeeblockchain.com\/blog\/glossary\/engineering-days\/\">engineering days<\/a><\/b>. We now publish a summary of our results.<!--more--><span id=\"more-254\"><\/span><\/p>\n<h4 class=\"p2\"><b>METHODOLOGY<\/b><\/h4>\n<p class=\"p1\">We start by reviewing the specifications, sources, and instructions provided to us, which is essential to ensure we understand the project\u2019s size, scope, and functionality. This is followed by due diligence using the automated\u00a0<a href=\"https:\/\/ackeeblockchain.com\/blog\/glossary\/solidity\/\">Solidity<\/a>\u00a0analysis tools and\u00a0<a href=\"https:\/\/ackeeblockchain.com\/blog\/glossary\/slither\/\">Slither<\/a>.<\/p>\n<p class=\"p1\">In addition to tool-based analysis, we continue with a detailed manual code review, which is the process of reading the source code line by line to identify potential vulnerabilities or code duplications. When the code review is complete, we run unit tests to ensure the system works as expected and potentially write missing unit or fuzzy tests. We also deploy the\u00a0<a href=\"https:\/\/ackeeblockchain.com\/blog\/glossary\/smart-contract\/\">contracts<\/a>\u00a0locally and try to attack and break the system.<\/p>\n<h4 class=\"p2\"><b>SCOPE\u00a0<\/b><\/h4>\n<div class=\"page\" title=\"Page 6\">\n<div class=\"layoutArea\">\n<div class=\"column\">\n<p>The audit was performed on two repositories: we audited commit <em>9f9ca0d<\/em><i>\u00a0<\/i>of the <a href=\"https:\/\/github.com\/axelarnetwork\/axelar-cgp-solidity\/tree\/9f9ca0d597ba5237e5f17cadfccf75b60f2aa9f0\">axelarnetwork\/axelar-cgp-solidity<\/a> repository (file: contracts\/AxelarAuthMultisig.sol) and commit <em>327c543\u00a0<\/em>of the <a href=\"https:\/\/github.com\/axelarnetwork\/axelar-xc20-wrapper\/tree\/327c54384a3346c96631c5b4cc28d059ed6bf363\">axelarnetwork\/axelar-xc20-wrapper<\/a> repository (file: contracts\/*).<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p class=\"p1\">During the security review,\u00a0<strong>we paid particular attention to<\/strong>:<\/p>\n<div class=\"page\" title=\"Page 6\">\n<div class=\"layoutArea\">\n<div class=\"column\">\n<div class=\"page\" title=\"Page 7\">\n<div class=\"layoutArea\">\n<div class=\"column\">\n<ul>\n<li>validating the upgradeability pattern;<\/li>\n<li>detecting possible reentrancies in the code;<\/li>\n<li>ensuring access controls are not too relaxed or too strict;<\/li>\n<li>looking for common issues such as data validation.<\/li>\n<\/ul>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<h4 class=\"p2\"><b>FINDINGS<\/b><\/h4>\n<p class=\"p1\">Here we present our\u00a0<a href=\"https:\/\/ackeeblockchain.com\/blog\/glossary\/findings\/\"><span class=\"s1\">findings<\/span><\/a>.<\/p>\n<h5 class=\"p4\"><b>Critical severity\u00a0<\/b><\/h5>\n<p class=\"p1\">No critical severity issues were found.<\/p>\n<h5 class=\"p4\"><b>High severity\u00a0<\/b><\/h5>\n<div class=\"page\" title=\"Page 12\">\n<div class=\"section\">\n<div class=\"layoutArea\">\n<div class=\"column\">\n<div class=\"page\" title=\"Page 14\">\n<div class=\"section\">\n<div class=\"layoutArea\">\n<div class=\"column\">\n<p><strong>H1:<\/strong> Ignored return values on LocalAsset interface<\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<h5 class=\"p4\"><b>Medium severity<\/b><\/h5>\n<div class=\"page\" title=\"Page 12\">\n<div class=\"section\">\n<div class=\"layoutArea\">\n<div class=\"column\">\n<div class=\"page\" title=\"Page 14\">\n<div class=\"section\">\n<div class=\"layoutArea\">\n<div class=\"column\">\n<p><strong>M1:<\/strong> Floating dependency on AxelarGateway<\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<h5 class=\"p4\"><b>Low severity<\/b><\/h5>\n<p class=\"p1\">No low severity issues were found.<\/p>\n<h5><strong>Warning severity<\/strong><\/h5>\n<div class=\"page\" title=\"Page 18\">\n<div class=\"section\">\n<div class=\"layoutArea\">\n<div class=\"column\">\n<div class=\"page\" title=\"Page 12\">\n<div class=\"section\">\n<div class=\"layoutArea\">\n<div class=\"column\">\n<div class=\"page\" title=\"Page 14\">\n<div class=\"section\">\n<div class=\"layoutArea\">\n<div class=\"column\">\n<p><strong>W1:<\/strong> Pitfalls of upgradeability<\/p>\n<div class=\"page\" title=\"Page 14\">\n<div class=\"section\">\n<div class=\"layoutArea\">\n<div class=\"column\">\n<p><strong>W2:<\/strong> The owner can change arbitrarily operatorship and potentially cause DoS<\/p>\n<div class=\"page\" title=\"Page 14\">\n<div class=\"section\">\n<div class=\"layoutArea\">\n<div class=\"column\">\n<p><strong>W3:<\/strong> XC20Wrapper owner has escalated priviliges<\/p>\n<div class=\"page\" title=\"Page 14\">\n<div class=\"section\">\n<div class=\"layoutArea\">\n<div class=\"column\">\n<p><strong>W4:<\/strong> Missing unit tests<\/p>\n<div class=\"page\" title=\"Page 15\">\n<div class=\"section\">\n<div class=\"layoutArea\">\n<div class=\"column\">\n<p><strong>W5:<\/strong> Usage of <span style=\"color: #0000ff;\">solc<\/span> optimizer<\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<h5 class=\"p4\"><b>Informational severity\u00a0<\/b><\/h5>\n<div class=\"page\" title=\"Page 13\">\n<div class=\"section\">\n<div class=\"layoutArea\">\n<div class=\"column\">\n<div class=\"page\" title=\"Page 15\">\n<div class=\"section\">\n<div class=\"layoutArea\">\n<div class=\"column\">\n<p><strong>I1:<\/strong> Typo in the variable name<\/p>\n<div class=\"page\" title=\"Page 15\">\n<div class=\"section\">\n<div class=\"layoutArea\">\n<div class=\"column\">\n<p><strong>I2:<\/strong> Missing events<\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<h4 class=\"p2\"><b>CONCLUSION<\/b><\/h4>\n<p class=\"p1\">Our review resulted in <b>9 findings<\/b>\u00a0ranging from\u00a0<i>Informational<\/i>\u00a0to\u00a0<em>High<\/em> severity.<\/p>\n<p class=\"p1\">After the audit,\u00a0<b>we recommended<\/b>\u00a0<strong>Axelar<\/strong>\u00a0<strong>to<\/strong>:<\/p>\n<div class=\"page\" title=\"Page 7\">\n<div class=\"layoutArea\">\n<div class=\"column\">\n<ul>\n<li>create documentation including NatSpec comments;<\/li>\n<li>reconsider the current upgradeability pattern;<\/li>\n<li>write unit tests for <a href=\"https:\/\/github.com\/axelarnetwork\/axelar-xc20-wrapper\/tree\/327c54384a3346c96631c5b4cc28d059ed6bf363\">XC20 Wrapper<\/a>;<\/li>\n<li>address all other reported issues.<\/li>\n<\/ul>\n<p><b>Update:\u00a0<\/b>On <strong>July<\/strong><b>\u00a025, 2022<\/b>, Axelar provided an updated codebase that addresses the reported issue. The updated commit for XC20 Wrapper was <a href=\"https:\/\/github.com\/axelarnetwork\/axelar-xc20-wrapper\/commit\/4340a2f3a861340d5877dc45f2de1abbff0c3cd9\"><em>4340a2f<\/em><\/a> and after reporting an incorrect fix in H1F, it was changed to <a href=\"https:\/\/github.com\/axelarnetwork\/axelar-xc20-wrapper\/commit\/dd49548ea83725aaf5fc1f76444f3825b276a419\"><em>dd49548<\/em><\/a>. No changes have been made in the <a href=\"https:\/\/github.com\/axelarnetwork\/axelar-cgp-solidity\/tree\/9f9ca0d597ba5237e5f17cadfccf75b60f2aa9f0\">Solidity CGP Gateway<\/a>. Some of the findings were fixed (H1, M1, W4). A detailed discussion of the exact status of each issue can be found in Appendix D of the report.<\/p>\n<p>&nbsp;<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p class=\"p1\"><b>Ackee Blockchain\u2019s full<em> Axelar:<\/em> <\/b><em><strong>Ethereum contracts<\/strong><\/em><b><em>\u00a0<\/em>audit report with a more detailed description of all findings and recommendations can be found\u00a0<\/b><a href=\"https:\/\/github.com\/axelarnetwork\/audits\/blob\/main\/audits\/2022-07%20Ackee%20blockchain.pdf\"><span class=\"s1\"><b>here<\/b><\/span><\/a><b>.<\/b><\/p>\n<p>&nbsp;<\/p>\n<p>We were delighted to audit<b>\u00a0Axelar<\/b>\u00a0and look forward to working with them again.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Between July 4 and July 12, 2022, Axelar\u00a0engaged\u00a0Ackee Blockchain\u00a0to review and\u00a0audit changes on several Ethereum contracts. The entire audit process was conducted with a total time commitment of\u00a05 engineering days. We now publish a summary of our results.<\/p>\n","protected":false},"author":11,"featured_media":434,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[20,10],"tags":[21,72,27,26,24,33,52,17,64,28,13],"class_list":["post-383","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-audits","category-ethereum","tag-audit","tag-axelar","tag-blockchain","tag-cryptocurrency","tag-ethereum","tag-evm","tag-findings","tag-fuzzy-testing","tag-security","tag-smart-contract","tag-vulnerability"],"aioseo_notices":[],"featured_image_src":"https:\/\/ackee.xyz\/blog\/wp-content\/uploads\/2022\/07\/Axelar2-1-600x400.png","featured_image_src_square":"https:\/\/ackee.xyz\/blog\/wp-content\/uploads\/2022\/07\/Axelar2-1-600x600.png","author_info":{"display_name":"Andrea Nov\u00e1kov\u00e1","author_link":"https:\/\/ackee.xyz\/blog\/author\/andrea-novakova\/"},"_links":{"self":[{"href":"https:\/\/ackee.xyz\/blog\/wp-json\/wp\/v2\/posts\/383","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ackee.xyz\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ackee.xyz\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ackee.xyz\/blog\/wp-json\/wp\/v2\/users\/11"}],"replies":[{"embeddable":true,"href":"https:\/\/ackee.xyz\/blog\/wp-json\/wp\/v2\/comments?post=383"}],"version-history":[{"count":0,"href":"https:\/\/ackee.xyz\/blog\/wp-json\/wp\/v2\/posts\/383\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ackee.xyz\/blog\/wp-json\/wp\/v2\/media\/434"}],"wp:attachment":[{"href":"https:\/\/ackee.xyz\/blog\/wp-json\/wp\/v2\/media?parent=383"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ackee.xyz\/blog\/wp-json\/wp\/v2\/categories?post=383"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ackee.xyz\/blog\/wp-json\/wp\/v2\/tags?post=383"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}