Could SN suffer from a "flash loan" attack?

I’ve seen many flash loan attacks on many different blockchains and DeX.
So I was wondering, does SN allows for such type of loan?

3 Likes

Extremely unlikely to occur in the Cosmos ecosystem.

Also, there currently isn’t anywhere to get a flash loan in the ecosystem from my understanding.

2 Likes

I’m not aware of any project in the cosmos ecosystem that is offering flash loans (maybe on Terra?), but here are my thought on this:

  1. It’s rather easy to implement as a CosmWasm contract, the hard part is getting the liquidity and offering attractive yields.
  2. It’s hard to know if a protocol is susceptible to an attack. For example in SCRT governance the votes are counted in the end of the first block that’s after the voting period. If someone were to take a flash loan of bonded SCRT in order to vote, they’d need to hold that loan for at least 2 blocks, which is not possible with a flash loan. Also, there’s no mechanism on Secret Network that is affected by SCRT’s price, therefore a flash loan skewing the price for 1 tx won’t help facilitate an attack on SCRT. However, other protocols that are using SCRT might be susceptible, but it won’t affect Secret’s security unless someone can steal 33% of bonded tokens.
  3. I think that flash loans are a good tool for arbitrageurs to maintain efficient markets.
1 Like

Will just drop this here as it’s relevant to flash loans on cosmos ecosystem:

They sandwich your message in between the ‘loan out’ and ‘claw back’ messages, although I’m uncertain if they’re going to go with a whitelist approach or allow arbitrary contracts to perform flash loans.