create account

Solana based ANA stablecoin crashes after flash loan exploit by themarkymark

View this thread on: hive.blogpeakd.comecency.com
· @themarkymark ·
$12.10
Solana based ANA stablecoin crashes after flash loan exploit
![image.png](https://images.hive.blog/DQmf9YNztywZTQh78kmZFkjxTKcoAB4Th9oBiB86kaBkzat/image.png)

Solana can't seem to stay out of the news and not in a way you want to be featured.  Around $3.5 million was exploited from the Nirvana Finance platform due to a flash loan exploit.  Nirvana Finance is a DeFi protocol on Solana.  As far as I know it, Nirvana Finance is not owned by Solana team and is a third-party project.

# What is a flash loan?

A flash loan is similar to any other unsecured lending in the crypto space except for the fact the entire lifecycle is in a single transaction.  That means a user will borrow and pay back funds immediately.  This is only possible using platforms that support smart contracts.

---

The main reason to use flash loans is to take advantage of an arbitrage opportunity with more leverage.

Because flash loans are handled by a smart contract, they are generally considered safe for both parties.  However if you exploit the price of one of the tokens in the transaction to make it seems as though the loan is repaid, you can come out with millions in profit.  

---

# Nirvana Finance exploit

This is how Nirvana Finance was exploited.  A user took out a flash loan for $10 million dollars worth of USDC and minted $10 million worth of ANA.  This increased the price of ANA in excess of $10 million dollars allowing the attacker to return fewer ANA tokens than they minted.  

![image.png](https://images.hive.blog/DQmQcNJ3pWkDsidWGBasRBLUaicsZiQfVfGDPs2eNxoS1Qy/image.png)

In this case, they were able to make around $3.5 million dollar profit.  The price of ANA dropped around 90% as a result of this.

Flash loan attacks are not new and the largest known flash loan attack happened on Ethereum for over $182 million dollars.

Posted Using [LeoFinance <sup>Beta</sup>](https://leofinance.io/@themarkymark/solana-based-ana-stablecoin-crashes-after-flash-loan-exploit)
👍  , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and 516 others
👎  , , , , , , , , , , , , ,
properties (23)
authorthemarkymark
permlinksolana-based-ana-stablecoin-crashes-after-flash-loan-exploit
categoryhive-167922
json_metadata{"app":"leofinance/0.2","format":"markdown","tags":["solana","hive-engine","vyb","ctp","cent","proofofbrain","neoxian","archon","leofinance"],"canonical_url":"https://leofinance.io/@themarkymark/solana-based-ana-stablecoin-crashes-after-flash-loan-exploit","image":["https://images.hive.blog/DQmf9YNztywZTQh78kmZFkjxTKcoAB4Th9oBiB86kaBkzat/image.png","https://images.hive.blog/DQmQcNJ3pWkDsidWGBasRBLUaicsZiQfVfGDPs2eNxoS1Qy/image.png"]}
created2022-07-30 06:12:21
last_update2022-07-30 06:12:21
depth0
children17
last_payout2022-08-06 06:12:21
cashout_time1969-12-31 23:59:59
total_payout_value6.106 HBD
curator_payout_value5.994 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length1,916
author_reputation1,671,983,126,001,488
root_title"Solana based ANA stablecoin crashes after flash loan exploit"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id115,276,017
net_rshares16,450,775,649,202
author_curate_reward""
vote details (594)
@apunawu ·
I thought it was owned by a Solana team not until you pointed them as a third party.
properties (22)
authorapunawu
permlinkre-themarkymark-2022730t14719423z
categoryhive-167922
json_metadata{"tags":["solana","hive-engine","vyb","ctp","cent","proofofbrain","neoxian","archon","leofinance"],"app":"ecency/3.0.24-vision","format":"markdown+html"}
created2022-07-30 08:47:21
last_update2022-07-30 08:47:21
depth1
children0
last_payout2022-08-06 08:47:21
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length84
author_reputation137,829,266,997,313
root_title"Solana based ANA stablecoin crashes after flash loan exploit"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id115,278,524
net_rshares0
@cryptosnowball ·
When you build a DeFi project, you need to test massively against exploits to be safe and secure the funds of investors.
👍  
properties (23)
authorcryptosnowball
permlinkre-themarkymark-2022730t5585924z
categoryhive-167922
json_metadata{"tags":["solana","hive-engine","vyb","ctp","cent","proofofbrain","neoxian","archon","leofinance"],"app":"ecency/3.0.24-vision","format":"markdown+html"}
created2022-07-30 09:59:00
last_update2022-07-30 09:59:00
depth1
children0
last_payout2022-08-06 09:59:00
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length120
author_reputation2,477,555,058,145
root_title"Solana based ANA stablecoin crashes after flash loan exploit"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id115,279,681
net_rshares5,412,246,115
author_curate_reward""
vote details (1)
@dalz ·
> A user took out a flash loan for $10 million dollars worth of USDC and minted $10 million worth of ANA. This increased the price of ANA in excess of $10 million dollars allowing the attacker to return fewer ANA tokens than they minted.

How did the price went up if the tokens were minted?
There were similar exploits on the PancakeBunny and the Belt platform, where they moved the price oracle for a bit ... not sure how did exactly happened here
properties (22)
authordalz
permlinkrftolo
categoryhive-167922
json_metadata{"app":"hiveblog/0.1"}
created2022-07-30 07:25:00
last_update2022-07-30 07:25:00
depth1
children3
last_payout2022-08-06 07:25:00
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length449
author_reputation1,298,465,611,467,586
root_title"Solana based ANA stablecoin crashes after flash loan exploit"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id115,276,964
net_rshares0
@themarkymark ·
> How did the price went up if the tokens were minted?

Contract Algorithm
👍  
👎  , , , ,
properties (23)
authorthemarkymark
permlinkre-dalz-rftovq
categoryhive-167922
json_metadata{"tags":["hive-167922"],"app":"peakd/2022.07.1"}
created2022-07-30 07:31:09
last_update2022-07-30 07:31:09
depth2
children2
last_payout2022-08-06 07:31:09
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length74
author_reputation1,671,983,126,001,488
root_title"Solana based ANA stablecoin crashes after flash loan exploit"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id115,277,024
net_rshares-396,223,792,351
author_curate_reward""
vote details (6)
@dalz ·
So a bad design ... realy bad coding practice there, especialy with a year of experiance in flash loans and tricking price oracles.
properties (22)
authordalz
permlinkrftp26
categoryhive-167922
json_metadata{"app":"hiveblog/0.1"}
created2022-07-30 07:34:54
last_update2022-07-30 07:34:54
depth3
children1
last_payout2022-08-06 07:34:54
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length131
author_reputation1,298,465,611,467,586
root_title"Solana based ANA stablecoin crashes after flash loan exploit"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id115,277,052
net_rshares0
@forexbrokr ·
RE: Solana based ANA stablecoin crashes after flash loan exploit
Oh...

ANOTHER Solana based stablecoin goes to zero?

Thought they might have learned from [Cashio's infinite glitch exploit](https://leofinance.io/@forexbrokr/you-know-which-stablecoin-didn-t-go-to-zero).

Guess not.

Next.

Posted Using [LeoFinance <sup>Beta</sup>](https://leofinance.io/@forexbrokr/re-themarkymark-65j1rd)
properties (22)
authorforexbrokr
permlinkre-themarkymark-65j1rd
categoryhive-167922
json_metadata{"app":"leofinance/0.2","format":"markdown","tags":["leofinance"],"canonical_url":"https://leofinance.io/@forexbrokr/re-themarkymark-65j1rd","links":["https://leofinance.io/@forexbrokr/you-know-which-stablecoin-didn-t-go-to-zero"]}
created2022-07-30 11:01:42
last_update2022-07-30 11:01:42
depth1
children0
last_payout2022-08-06 11:01:42
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length325
author_reputation423,122,348,693,842
root_title"Solana based ANA stablecoin crashes after flash loan exploit"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id115,280,643
net_rshares0
@giorgakis ·
Solana had another unsuccess story... What a surprise ... Not
properties (22)
authorgiorgakis
permlinkrfvgqg
categoryhive-167922
json_metadata{"app":"hiveblog/0.1"}
created2022-07-31 06:30:21
last_update2022-07-31 06:30:21
depth1
children0
last_payout2022-08-07 06:30:21
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length61
author_reputation13,693,341,312,790
root_title"Solana based ANA stablecoin crashes after flash loan exploit"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd0
post_id115,302,879
net_rshares0
@latinowinner ·
not the first and surely not the last attack
properties (22)
authorlatinowinner
permlinkre-themarkymark-2022730t22193417z
categoryhive-167922
json_metadata{"tags":["solana","hive-engine","vyb","ctp","cent","proofofbrain","neoxian","archon","leofinance"],"app":"ecency/3.0.24-vision","format":"markdown+html"}
created2022-07-30 12:19:33
last_update2022-07-30 12:19:33
depth1
children0
last_payout2022-08-06 12:19:33
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length44
author_reputation889,357,800,435
root_title"Solana based ANA stablecoin crashes after flash loan exploit"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id115,281,919
net_rshares0
@lordtimoty ·
$0.31
Shit eh? Not a bad pay day if you could get it. I'll be honest, at $3.5 million bucks I'd only need one day like that! I found 5 bucks in my pocket the other day and thought I was having a good week! 
👍  , ,
properties (23)
authorlordtimoty
permlinkre-themarkymark-rftqk8
categoryhive-167922
json_metadata{"tags":["hive-167922"],"app":"peakd/2022.07.1"}
created2022-07-30 08:07:24
last_update2022-07-30 08:07:24
depth1
children0
last_payout2022-08-06 08:07:24
cashout_time1969-12-31 23:59:59
total_payout_value0.156 HBD
curator_payout_value0.156 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length200
author_reputation134,706,772,473,562
root_title"Solana based ANA stablecoin crashes after flash loan exploit"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id115,277,785
net_rshares422,090,543,956
author_curate_reward""
vote details (3)
@manniman ·
Risk 10M on a field trip, I always assume that it's an insider job. You write it, you know it, you have a bad weekend in vegas so you come back and exploit it.
properties (22)
authormanniman
permlinkre-themarkymark-rfu4gn
categoryhive-167922
json_metadata{"tags":["hive-167922"],"app":"peakd/2022.07.1"}
created2022-07-30 13:07:36
last_update2022-07-30 13:07:36
depth1
children0
last_payout2022-08-06 13:07:36
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length159
author_reputation78,497,888,894,033
root_title"Solana based ANA stablecoin crashes after flash loan exploit"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id115,282,870
net_rshares0
@opidia ·
![EE57BAB6-B2DE-4D48-8B74-0B3C502DF6F7.jpeg](https://files.peakd.com/file/peakd-hive/opidia/23wgMn67BZC6x1vVEHFANmCYg9xRd1mGg7cZVBSbrt1wPynUa27SFCtn2pENSQWQS4h2q.jpeg)
properties (22)
authoropidia
permlinkre-themarkymark-rfwv2k
categoryhive-167922
json_metadata{"tags":["hive-167922"],"app":"peakd/2022.07.1"}
created2022-08-01 00:37:33
last_update2022-08-01 00:37:33
depth1
children0
last_payout2022-08-08 00:37:33
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length169
author_reputation45,493,816,399,766
root_title"Solana based ANA stablecoin crashes after flash loan exploit"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id115,323,115
net_rshares0
@poshtoken ·
https://twitter.com/Uyobong3/status/1553490856312770565
<sub> The rewards earned on this comment will go directly to the people( @uyobong ) sharing the post on Twitter as long as they are registered with @poshtoken. Sign up at https://hiveposh.com.</sub>
properties (22)
authorposhtoken
permlinkre-themarkymark-solana-based-ana-stablecoin-crashes-after-flash-lo-1681
categoryhive-167922
json_metadata"{"app":"Poshtoken 0.0.1","payoutToUser":["uyobong"]}"
created2022-07-30 21:24:24
last_update2022-07-30 21:24:24
depth1
children0
last_payout2022-08-06 21:24:24
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length255
author_reputation3,944,710,273,844,270
root_title"Solana based ANA stablecoin crashes after flash loan exploit"
beneficiaries
0.
accountreward.app
weight10,000
max_accepted_payout1,000,000.000 HBD
percent_hbd0
post_id115,293,603
net_rshares0
@typebox ·
*In this case, they were able to make around $3.5 million dollar profit. The price of ANA dropped around 90% as a result of this*- This way, the attacker could steal $3.5 million from the Nirvana treasury, repay the USDC loan, and then move the stolen funds to an Ethereum wallet converting it to DAI stablecoin.
properties (22)
authortypebox
permlinkre-themarkymark-rfuh4d
categoryhive-167922
json_metadata{"tags":["hive-167922"],"app":"peakd/2022.07.1"}
created2022-07-30 17:41:03
last_update2022-07-30 17:41:03
depth1
children0
last_payout2022-08-06 17:41:03
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length312
author_reputation27,973,379,649,572
root_title"Solana based ANA stablecoin crashes after flash loan exploit"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id115,288,938
net_rshares0
@urun ·
$0.02
![untitled.gif](https://media.tenor.com/images/9d582d278dc5e4ed349d7235ce6281ec/tenor.gif)

people still try to build more algo stablecoins?
👍  
properties (23)
authorurun
permlinkre-themarkymark-rfud11
categoryhive-167922
json_metadata{"tags":["hive-167922"],"app":"peakd/2022.07.1"}
created2022-07-30 16:12:39
last_update2022-07-30 16:12:39
depth1
children1
last_payout2022-08-06 16:12:39
cashout_time1969-12-31 23:59:59
total_payout_value0.010 HBD
curator_payout_value0.011 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length140
author_reputation93,309,389,073,611
root_title"Solana based ANA stablecoin crashes after flash loan exploit"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id115,287,044
net_rshares31,647,859,150
author_curate_reward""
vote details (1)
@manniman ·
Your hate is like a whirlwind

![untitled.gif](https://media.tenor.com/images/a051c65a0998f6d419709a4263df8852/tenor.gif)
👍  
properties (23)
authormanniman
permlinkre-urun-rfuqo6
categoryhive-167922
json_metadata{"tags":["hive-167922"],"app":"peakd/2022.07.1"}
created2022-07-30 21:07:18
last_update2022-07-30 21:07:18
depth2
children0
last_payout2022-08-06 21:07:18
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length121
author_reputation78,497,888,894,033
root_title"Solana based ANA stablecoin crashes after flash loan exploit"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id115,293,229
net_rshares1,197,806,479
author_curate_reward""
vote details (1)
@uyobong ·
RE: Solana based ANA stablecoin crashes after flash loan exploit
From $8 to less than $2 is a terrible plunge. I hope LeoFinance devs learn from news such as this to guard against such occurrences with PolyCUB and CubDeFi.

Posted Using [LeoFinance <sup>Beta</sup>](https://leofinance.io/@uyobong/re-themarkymark-2syhqr)
properties (22)
authoruyobong
permlinkre-themarkymark-2syhqr
categoryhive-167922
json_metadata{"app":"leofinance/0.2","format":"markdown","tags":["leofinance"],"canonical_url":"https://leofinance.io/@uyobong/re-themarkymark-2syhqr"}
created2022-07-30 21:16:42
last_update2022-07-30 21:16:42
depth1
children0
last_payout2022-08-06 21:16:42
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length255
author_reputation683,258,096,412,822
root_title"Solana based ANA stablecoin crashes after flash loan exploit"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id115,293,433
net_rshares0