Handling of ETH\/WETH:<\/strong> Contracts often contain specific logic for handling ETH. For example, if msg.value > 0, the contract can receive WETH directly while converting her ETH to WETH. If a user specifies her WETH as a currency and sends her ETH in a call, it breaks certain invariants and can lead to erroneous behavior.<\/li>\n<\/ul>\nSo far, we have discussed liquidity staking protocols and audit guidelines for such protocols. In a nutshell, liquidity staking allows users to earn staking rewards without sacrificing liquidity. We have outlined weaknesses in staking contracts that auditors must pay attention to. This includes withdrawal mechanisms, fee logic, LP token creation\/burning mechanisms, rounding errors, staking periods, external calls, price manipulation checks, and more. <\/p>\n
Auditors are encouraged to consult audit specifications, match specifications and codes, and verify fees and tokenomics verification. It also recommends additional checks such as looping over arrays, specifying memory or storage for struct type data, and front-running scenarios. These guidelines will help you audit your staking protocol and help identify potential bugs.<\/p>\n
\n 18<\/span> view<\/span><\/p>\n<\/p><\/div>\n","protected":false},"excerpt":{"rendered":"Read time: 6 minutes In this blog, we have outlined the concept of liquidity staking protocols and audit guidelines for staking protocols. This guideline covers various weak points such as withdrawal mechanisms, rounding errors, external calls, fee logic, loops, structures, staking periods, etc. This blog post serves as a reference for auditing staking protocols and […]<\/p>\n","protected":false},"author":5,"featured_media":18234,"comment_status":"","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"slim_seo":[],"footnotes":""},"categories":[27],"tags":[12689,12688,12690,1250],"class_list":["post-18233","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-defi","tag-auditing","tag-guidelines","tag-protocols","tag-staking"],"_links":{"self":[{"href":"http:\/\/www.investorsradar.com\/wp-json\/wp\/v2\/posts\/18233"}],"collection":[{"href":"http:\/\/www.investorsradar.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.investorsradar.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.investorsradar.com\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"http:\/\/www.investorsradar.com\/wp-json\/wp\/v2\/comments?post=18233"}],"version-history":[{"count":0,"href":"http:\/\/www.investorsradar.com\/wp-json\/wp\/v2\/posts\/18233\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/www.investorsradar.com\/wp-json\/wp\/v2\/media\/18234"}],"wp:attachment":[{"href":"http:\/\/www.investorsradar.com\/wp-json\/wp\/v2\/media?parent=18233"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.investorsradar.com\/wp-json\/wp\/v2\/categories?post=18233"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.investorsradar.com\/wp-json\/wp\/v2\/tags?post=18233"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}