{"id":457,"date":"2023-01-31T14:59:37","date_gmt":"2023-01-31T12:59:37","guid":{"rendered":"https:\/\/ackeeblockchain.com\/blog\/?p=457"},"modified":"2023-01-31T14:59:37","modified_gmt":"2023-01-31T12:59:37","slug":"2022-solana-hacks-explained-nirvana","status":"publish","type":"post","link":"https:\/\/ackee.xyz\/blog\/2022-solana-hacks-explained-nirvana\/","title":{"rendered":"2022 Solana Hacks Explained: Nirvana"},"content":{"rendered":"<p><span style=\"font-weight: 400;\"><a href=\"https:\/\/www.nirvana.finance\/\"><strong>Nirvana Finance<\/strong><\/a> is a Solana-based <strong>DeFi protocol<\/strong> with an algorithmic stablecoin.<\/span><\/p>\n<p><strong>What happened\u00a0<\/strong><\/p>\n<p><span style=\"font-weight: 400;\">On July 28, 2022, it ran into <strong>liquidity issues<\/strong> due to a <strong>flash loan<\/strong> attack where an attacker <strong>drained<\/strong> approximately <strong>$3.5M<\/strong> from the liquidity pool. The protocol is <strong>closed source<\/strong> and underwent only an<a href=\"https:\/\/uploads-ssl.webflow.com\/62acc2bbfa68c06f0b46f628\/62c729b1b482b308072715b2_nirvana-audit-certificate.pdf\"><strong> automated audit<\/strong><\/a> before the exploit. A manual <strong>human audit<\/strong> is still being <strong>scheduled<\/strong> as of the time of writing (January 2023).<\/span><\/p>\n<p><b>Exploit Details<\/b><\/p>\n<p><span style=\"font-weight: 400;\">The attacker used a <strong>flash loan<\/strong> from a lending protocol Solend, borrowed<strong> 10M USDC<\/strong>, and used it to <strong>mint over $10M<\/strong> worth of Nirvana&#8217;s <strong>ANA<\/strong> token. Afterwards, he <strong>swapped<\/strong> the ANA tokens to USDT stablecoins and r<strong>eceived 13.49M USDT<\/strong>. Finally, he <strong>returned<\/strong> the borrowed <strong>10M<\/strong> from Solend, which resulted in a <strong>$3.49M profit.<\/strong><\/span><\/p>\n<p><span style=\"font-weight: 400;\">Based on the <a href=\"https:\/\/medium.com\/nirvanafinance\/technical-post-mortem-d738935aeec\">technical post-mortem analysis<\/a> from the Nirvana Finance team, the attacker was able to <strong>manipulate the inputs to the program<\/strong> and buy the ANA token at an <strong>artificially low price.\u00a0<\/strong><\/span><\/p>\n<p><b>In simple words,<\/b><span style=\"font-weight: 400;\"> very much like in case with <a title=\"2022 Solana Hacks Explained: Solend\" href=\"https:\/\/ackeeblockchain.com\/blog\/2022-solana-hacks-explained-solend\/\">Solend<\/a>, it was a combination of a <strong>market manipulation<\/strong> with some <strong>hacking<\/strong>: first he artificially <strong>lowered the price<\/strong> to buy himself ANAs and by doing so, the exploiter <strong>pushed the price upwards<\/strong> and made a <strong>profit from the spread.<\/strong><\/span><\/p>\n<p><strong>Reference<\/strong><\/p>\n<p><a href=\"https:\/\/medium.com\/nirvanafinance\/technical-post-mortem-d738935aeec\"><strong>1<\/strong><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Nirvana Finance is a Solana-based DeFi protocol with an algorithmic stablecoin. What happened\u00a0 On July 28, 2022, it ran into liquidity issues due to a flash loan attack where an attacker drained approximately $3.5M from the liquidity pool. The protocol is closed source and underwent only an automated audit before the exploit. A manual human audit is still being scheduled as of&hellip;<\/p>\n","protected":false},"author":15,"featured_media":458,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[85,84,5],"tags":[14,86,6,19],"class_list":["post-457","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-exploits","category-hacks","category-solana","tag-exploit","tag-hack","tag-solana","tag-solana-security"],"aioseo_notices":[],"featured_image_src":"https:\/\/ackee.xyz\/blog\/wp-content\/uploads\/2023\/01\/Nirvana-600x400.png","featured_image_src_square":"https:\/\/ackee.xyz\/blog\/wp-content\/uploads\/2023\/01\/Nirvana-600x600.png","author_info":{"display_name":"Aleksandra Yudina","author_link":"https:\/\/ackee.xyz\/blog\/author\/aleksandra-yudina\/"},"_links":{"self":[{"href":"https:\/\/ackee.xyz\/blog\/wp-json\/wp\/v2\/posts\/457","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\/15"}],"replies":[{"embeddable":true,"href":"https:\/\/ackee.xyz\/blog\/wp-json\/wp\/v2\/comments?post=457"}],"version-history":[{"count":0,"href":"https:\/\/ackee.xyz\/blog\/wp-json\/wp\/v2\/posts\/457\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ackee.xyz\/blog\/wp-json\/wp\/v2\/media\/458"}],"wp:attachment":[{"href":"https:\/\/ackee.xyz\/blog\/wp-json\/wp\/v2\/media?parent=457"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ackee.xyz\/blog\/wp-json\/wp\/v2\/categories?post=457"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ackee.xyz\/blog\/wp-json\/wp\/v2\/tags?post=457"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}