• bitcoinBitcoin (BTC) $ 67,366.00
  • ethereumEthereum (ETH) $ 3,250.93
  • tetherTether (USDT) $ 1.00
  • bnbBNB (BNB) $ 597.99
  • solanaSolana (SOL) $ 153.54
  • usd-coinUSDC (USDC) $ 1.00
  • staked-etherLido Staked Ether (STETH) $ 3,235.04
  • xrpXRP (XRP) $ 0.543227
  • dogecoinDogecoin (DOGE) $ 0.172355
  • the-open-networkToncoin (TON) $ 6.46
  • cardanoCardano (ADA) $ 0.491752
  • avalanche-2Avalanche (AVAX) $ 39.15
  • shiba-inuShiba Inu (SHIB) $ 0.000024
  • bitcoin-cashBitcoin Cash (BCH) $ 531.39
  • wrapped-bitcoinWrapped Bitcoin (WBTC) $ 67,227.00
  • tronTRON (TRX) $ 0.114313
  • polkadotPolkadot (DOT) $ 7.06
  • chainlinkChainlink (LINK) $ 14.84
  • matic-networkPolygon (MATIC) $ 0.758087
  • litecoinLitecoin (LTC) $ 85.63
  • internet-computerInternet Computer (ICP) $ 13.65
  • nearNEAR Protocol (NEAR) $ 5.75
  • uniswapUniswap (UNI) $ 7.91
  • leo-tokenLEO Token (LEO) $ 5.77
  • daiDai (DAI) $ 1.00
  • ethereum-classicEthereum Classic (ETC) $ 29.16
  • first-digital-usdFirst Digital USD (FDUSD) $ 1.01
  • aptosAptos (APT) $ 9.82
  • blockstackStacks (STX) $ 2.68
  • mantleMantle (MNT) $ 1.16
  • crypto-com-chainCronos (CRO) $ 0.139452
  • cosmosCosmos Hub (ATOM) $ 9.26
  • bittensorBittensor (TAO) $ 530.15
  • filecoinFilecoin (FIL) $ 6.45
  • stellarStellar (XLM) $ 0.114872
  • okbOKB (OKB) $ 53.82
  • vechainVeChain (VET) $ 0.042925
  • hedera-hashgraphHedera (HBAR) $ 0.086280
  • immutable-xImmutable (IMX) $ 2.17
  • render-tokenRender (RNDR) $ 8.04
  • arbitrumArbitrum (ARB) $ 1.13
  • kaspaKaspa (KAS) $ 0.123582
  • dogwifcoindogwifhat (WIF) $ 2.78
  • makerMaker (MKR) $ 2,941.59
  • the-graphThe Graph (GRT) $ 0.264490
  • pepePepe (PEPE) $ 0.000006
  • optimismOptimism (OP) $ 2.42
  • theta-tokenTheta Network (THETA) $ 2.46
  • ethena-usdeEthena USDe (USDE) $ 1.00
  • injective-protocolInjective (INJ) $ 26.37
  • wrapped-eethWrapped eETH (WEETH) $ 3,350.45
  • fetch-aiFetch.ai (FET) $ 2.15
  • moneroMonero (XMR) $ 119.13
  • fantomFantom (FTM) $ 0.765023
  • thorchainTHORChain (RUNE) $ 5.97
  • lido-daoLido DAO (LDO) $ 2.13
  • rocket-pool-ethRocket Pool ETH (RETH) $ 3,583.04
  • ethenaEthena (ENA) $ 1.29
  • galaGALA (GALA) $ 0.047593
  • bitget-tokenBitget Token (BGB) $ 1.25
  • mantle-staked-etherMantle Staked Ether (METH) $ 3,322.12
  • arweaveArweave (AR) $ 24.42
  • celestiaCelestia (TIA) $ 9.00
  • suiSui (SUI) $ 1.21
  • algorandAlgorand (ALGO) $ 0.190953
  • flokiFLOKI (FLOKI) $ 0.000158
  • bitcoin-svBitcoin SV (BSV) $ 77.73
  • flowFlow (FLOW) $ 1.02
  • quant-networkQuant (QNT) $ 104.46
  • sei-networkSei (SEI) $ 0.558540
  • aaveAave (AAVE) $ 99.55
  • neoNEO (NEO) $ 20.43
  • jupiter-exchange-solanaJupiter (JUP) $ 1.03
  • coredaoorgCore (CORE) $ 1.58
  • beam-2Beam (BEAM) $ 0.026732
  • bittorrentBitTorrent (BTT) $ 0.000001
  • ribbon-financeRibbon Finance (RBN) $ 1.40
  • zebec-protocolZebec Network (ZBCN) $ 0.026173
  • whitebitWhiteBIT Coin (WBT) $ 9.07
  • dydx-chaindYdX (DYDX) $ 2.81
  • ether-fi-staked-ethether.fi Staked ETH (EETH) $ 3,185.31
  • flare-networksFlare (FLR) $ 0.033620
  • ordinalsORDI (ORDI) $ 61.09
  • nervos-networkNervos Network (CKB) $ 0.028919
  • tokenize-xchangeTokenize Xchange (TKX) $ 14.95
  • elrond-erd-2MultiversX (EGLD) $ 43.47
  • ecasheCash (XEC) $ 0.000059
  • the-sandboxThe Sandbox (SAND) $ 0.510711
  • axie-infinityAxie Infinity (AXS) $ 8.00
  • bonkBonk (BONK) $ 0.000017
  • wormholeWormhole (W) $ 0.612855
  • starknetStarknet (STRK) $ 1.52
  • singularitynetSingularityNET (AGIX) $ 0.849465
  • tezosTezos (XTZ) $ 1.11
  • eosEOS (EOS) $ 0.942937
  • havvenSynthetix Network (SNX) $ 3.24
  • conflux-tokenConflux (CFX) $ 0.270913
  • chilizChiliz (CHZ) $ 0.117873
  • ondo-financeOndo (ONDO) $ 0.703916
  • gatechain-tokenGate (GT) $ 7.51
  • kucoin-sharesKuCoin (KCS) $ 10.09
  • roninRonin (RON) $ 3.11
  • worldcoin-wldWorldcoin (WLD) $ 5.24
  • decentralandDecentraland (MANA) $ 0.514366
  • msolMarinade staked SOL (MSOL) $ 178.09
  • pyth-networkPyth Network (PYTH) $ 0.639596
  • jasmycoinJasmyCoin (JASMY) $ 0.019202
  • cheeleeCheelee (CHEEL) $ 15.99
  • mina-protocolMina Protocol (MINA) $ 0.838488
  • gnosisGnosis (GNO) $ 343.75
  • heliumHelium (HNT) $ 5.29
  • kavaKava (KAVA) $ 0.783384
  • akash-networkAkash Network (AKT) $ 3.70
  • iotaIOTA (IOTA) $ 0.262542
  • apecoinApeCoin (APE) $ 1.29
  • pancakeswap-tokenPancakeSwap (CAKE) $ 3.22
  • echelon-primeEchelon Prime (PRIME) $ 21.00
  • kelp-dao-restaked-ethKelp DAO Restaked ETH (RSETH) $ 3,273.57
  • frax-etherFrax Ether (FRXETH) $ 3,212.88
  • dexeDeXe (DEXE) $ 13.08
  • nexoNEXO (NEXO) $ 1.32
  • klay-tokenKlaytn (KLAY) $ 0.201558
  • sats-ordinalsSATS (Ordinals) (SATS) $ 0.00000035
  • usddUSDD (USDD) $ 0.999166
  • mantra-daoMANTRA (OM) $ 0.903892
  • bitcoin-goldBitcoin Gold (BTG) $ 41.76
  • aioz-networkAIOZ Network (AIOZ) $ 0.674879
  • aerodrome-financeAerodrome Finance (AERO) $ 1.78
  • dydxdYdX (ETHDYDX) $ 2.32
  • swethSwell Ethereum (SWETH) $ 3,415.04
  • lido-staked-solLido Staked SOL (STSOL) $ 178.56
  • oasis-networkOasis Network (ROSE) $ 0.103295
  • axelarAxelar (AXL) $ 1.10
  • osmosisOsmosis (OSMO) $ 1.04
  • corgiaiCorgiAI (CORGIAI) $ 0.001993
  • illuviumIlluvium (ILV) $ 103.48
  • fraxFrax (FRAX) $ 0.998965
  • radixRadix (XRD) $ 0.061729
  • astarAstar (ASTR) $ 0.112352
  • theta-fuelTheta Fuel (TFUEL) $ 0.096873
  • blurBlur (BLUR) $ 0.413799
  • wemix-tokenWEMIX (WEMIX) $ 1.66
  • terra-lunaTerra Luna Classic (LUNC) $ 0.000106
  • coinbase-wrapped-staked-ethCoinbase Wrapped Staked ETH (CBETH) $ 3,451.07
  • pendlePendle (PENDLE) $ 6.27
  • altlayerAltLayer (ALT) $ 0.479782
  • based-brettBrett (BRETT) $ 0.073213
  • dymensionDymension (DYM) $ 3.64
  • iotexIoTeX (IOTX) $ 0.062993
  • woo-networkWOO (WOO) $ 0.317598
  • tether-goldTether Gold (XAUT) $ 2,346.04
  • curve-dao-tokenCurve DAO (CRV) $ 0.478827
  • fasttokenFasttoken (FTN) $ 1.79
  • xdce-crowd-saleXDC Network (XDC) $ 0.039602
  • 1inch1inch (1INCH) $ 0.471208
  • book-of-memeBOOK OF MEME (BOME) $ 0.009751
  • ocean-protocolOcean Protocol (OCEAN) $ 0.881011
  • staked-frax-etherStaked Frax Ether (SFRXETH) $ 3,482.42
  • manta-networkManta Network (MANTA) $ 2.10
  • enjincoinEnjin Coin (ENJ) $ 0.363400
  • mx-tokenMX (MX) $ 5.21
  • true-usdTrueUSD (TUSD) $ 1.00
  • skaleSKALE (SKL) $ 0.098816
  • zilliqaZilliqa (ZIL) $ 0.027972
  • memecoin-2Memecoin (MEME) $ 0.032398
  • ether-fiEther.fi (ETHFI) $ 4.30
  • apenftAPENFT (NFT) $ 0.00000050
  • ankrAnkr Network (ANKR) $ 0.048280
  • qtumQtum (QTUM) $ 4.64
  • pups-ordinalsPUPS (Ordinals) (PUPS) $ 61.41
  • siacoinSiacoin (SC) $ 0.008422
  • ethereum-name-serviceEthereum Name Service (ENS) $ 15.38
  • terra-luna-2Terra (LUNA) $ 0.673293
  • stepnGMT (GMT) $ 0.240068
  • trust-wallet-tokenTrust Wallet (TWT) $ 1.11
  • 0x0x Protocol (ZRX) $ 0.539768
  • celoCelo (CELO) $ 0.855595
  • holotokenHolo (HOT) $ 0.002553
  • compound-wrapped-btccWBTC (CWBTC) $ 1,351.37
  • rocket-poolRocket Pool (RPL) $ 22.26
  • aelfaelf (ELF) $ 0.616975
  • ravencoinRavencoin (RVN) $ 0.032166
  • project-galaxyGalxe (GAL) $ 4.19
  • ethereum-pow-iouEthereumPoW (ETHW) $ 4.08
  • biconomyBiconomy (BICO) $ 0.588240
  • polymeshPolymesh (POLYX) $ 0.428290
  • jeo-bodenJeo Boden (BODEN) $ 0.623401
  • basic-attention-tokenBasic Attention (BAT) $ 0.289674
  • pax-goldPAX Gold (PAXG) $ 2,337.32
  • golemGolem (GLM) $ 0.422095
  • frax-shareFrax Share (FXS) $ 5.42
  • amp-tokenAmp (AMP) $ 0.007509
  • superfarmSuperVerse (SUPER) $ 0.920943
  • compound-governance-tokenCompound (COMP) $ 59.77
  • raydiumRaydium (RAY) $ 1.58
  • stader-ethxStader ETHx (ETHX) $ 3,315.92
  • safepalSafePal (SFP) $ 0.874556
  • origintrailOriginTrail (TRAC) $ 0.992013
  • jito-governance-tokenJito (JTO) $ 3.41
  • pixelsPixels (PIXEL) $ 0.503746

Have we learned anything from Curve Finance and DeFi’s susceptibility to attacks?

0 109

Have we learned anything from Curve Finance and DeFi’s susceptibility to attacks?

  forkast.news 10 m

Have we learned anything from Curve Finance and DeFi’s susceptibility to attacks?

Curve Finance’s recent near-death experience (and its averted propagation) may seem like a blur in Web3’s rear-view mirror, but it’s actually something that keeps happening in the industry. It’s not the first time that a decentralized finance protocol — or any decentralized app for that matter — has been affected by an attack that is perfectly legal within its own code. More so, the crisis could’ve been prevented if on-chain risk management existed.

All of this points to a broader problem in Web3. That is the problem of limited expressivity and resources that exist in its development environments and how it affects security overall.

Hack or exploit?

When the Curve Finance attacker was able to retrieve US$61.7 million in assets from Curve Finance’s smart contracts, many media outlets and commentators called the event a “hack.” But this was not a hack — it was an exploit. The difference here is key.

In this context, a hack would’ve taken place if the attacker had somehow bypassed or broken an existing security measure. But the attack on Curve was an exploit. Nothing that happened that was out of the ordinary in terms of what the protocol’s Vyper code allowed for. The looter simply took advantage of how the protocol’s design worked.

Who’s to blame for this? No one. Curve’s Vyper code, like most of the (Solidity) code that’s used in Web3 applications, is severely limited in its ability to express complexity beyond relatively simple transaction logic.

This makes it hard for anyone to design security measures that would prevent this or any other attacks. More worryingly, it also makes it hard for anyone to properly design tools to prevent their spread across DeFi’s vast and composable liquidity landscape.

On-chain risk analysis

But it doesn’t mean there was nothing Curve could do to prevent this attack and its spread across DeFi. A simple example of a solution would be on-chain risk analysis.

The generalized version of a problematic pattern that could be solved can be summarized in a hypothetical situation like this one:

  • Bad actor Bob buys $5 million worth of the highly volatile $RISKY token via a flashloan.
  • The value of $RISKY token is effectively pumped by Bob after the purchase.
  • Bob takes out a $100 million loan on Naive Finance backed by $RISKY.
  • Naive Finance checks the price of $RISKY and confirms that Bob is “good” for the money.
  • Bob runs.
  • When Naive Finance liquidates $RISKY it is only worth $5 million.

(Another example of this general pattern can be found in the Euler hack from March.)

Traditionally, this problem is solved by risk analysis solutions that determine how good of a guarantee an asset can be. If they existed on-chain, Naive Finance could check statistical estimations based on the token’s historical price before approving the loan. The protocol would’ve seen through the pump and denied Bob the $100 million.

DeFi is lacking this kind of on-chain risk analysis and management.

Going back to Curve Finance, a spread could’ve been prevented if Aave and Frax had an automated, on-chain limit on loan approvals when they pass a percentage of the collateral token’s circulating supply. This would’ve been a safer and less stress-inducing situation for everybody.

Limited expressivity and resources

The real problem here is that current Web3 ecosystems can’t support something like this on-chain risk analysis solution. They’re limited by the kind of libraries and frameworks that are available in virtual machines like the Ethereum Virtual Machine. They’re also limited in terms of the resources at their disposal.

In order to develop something like this risk analysis and management solution, a decentralized app would need to count on coding libraries that have functions for at least basic mathematical concepts like logarithms and others.

This is not the case in Web3 because dApps don’t have access to NumPy, the math module in Python, for example. The typical toolbox isn’t there and developers have to reinvent the wheel instead.

Then we have another problem. Even if they had these libraries, they would be too expensive to code. Literally expensive. The Ethereum Virtual Machine is designed so that there’s a price for every computation.

While there are valid reasons for this, such as preventing infinite loops and such, it also creates a resource limitation for dApps that might need to scale computationally without incurring unreasonable costs. One could easily see how a risk management solution would cost more to run than what it’s able to save in funds.

Focusing on the right problems

At a localized level, the spread of the Curve Finance impasse could’ve been prevented with on-chain risk management. At a general level, this whole class of attacks could be prevented with more expressivity and resources in Web3.

These are two aspects of blockchain scalability that have long been overlooked because they go beyond affording more shared block space for dApps. They actually involve the creation of development environments in Web3 that emulate those of Web2. They’re about computational scalability and programmability, not just scaling the amount of data that is available on-chain.

Perhaps if protocol developers at Curve, Aave or Frax had the ability to count on a better toolbox and more resources, these and future exploits could be avoided altogether. Maybe we could start with on-chain risk management.

Source

Leave A Reply

Your email address will not be published.