Ultimate magazine theme for WordPress.

DeFi Security Challenges – big picture concerns

Users of conventional finance- brokers, banks, credit unions and regulated markets like stock exchanges and commodity markets- are used to various forms of backstops- FDIC deposit insurance, SIPC broker resinsurance and a literal alphabet soup of regulatory cops. Beyond that are various litigation-based security recourses.

For decentralized finance that entire risk-deferment eco-system is essentially non-existent, at least at this moment in time.

DeFi security concerns and risks

DeFi products are built upon smart contracts dealing directly or indirectly with user funds. When more money is associated with a certain smart contract, it becomes more attractive for attackers. Thus, smart contracts can be seen as an equivalent to public bug bounty programs since every user that finds a bug inside the contract can exploit the vulnerability and potentially steal money. The fact that the contract code and all past interactions with it are transparently stored on the blockchain makes it even easier to find bugs. Therefore, smart contract developers must put much effort into programming contracts without vulnerabilities. Using well-known design patterns and best practices is a good starting point. Additional security audits from external parties may increase the trust in the correctness of a contract as well. Developers can also design a contract such that potential security patches might be applicable while the contract is running on the blockchain. However, such an update mechanism requires some form of governance, which effectively lowers the degree of decentralization. The past showed the massive impact of programming bugs in smart contracts, e.g., on the DAO and parity wallets

Second, the underlying infrastructure may have additional influences on the DeFi product, which needs to be considered when designing application-specific security mechanisms. For instance, the limited throughput of the Ethereum blockchain led to a congestion of the network in 2020. Suppose a contract makes use of timeouts to ensure timely interaction by the participants. In that case, a congested network may result in users missing their timeouts since valid transactions from honest users might not be recorded in time . Hence, the properties of the underlying consensus

mechanism influence application-specific security properties. Third, designing new protocols for the DeFi space requires special consideration. In particular, because of the opportunity of composing different DeFi products and creating new protocols based on existing ones. The security of a single protocol cannot be analyzed in a standalone model; influences of other protocols also need to be taken into account. We show this aspect by highlighting two specific attacks presented in prior work. The first attack, called frontrunning, was analyzed by Daian et al. [47]. The term frontrunning comprises all scenarios where one party tries to get her transaction recorded before a competing transaction. Any attempt to frontrun may result in a so-called priority gas auction where users alternate in increasing their transactions’ gas price to incentive miners to include their transactions first.
One example of frontrunning is arbitrage. By deliberately exploiting different exchange rates at DEXes, users can gain money via arbitrage. Although arbitrage is also possible in traditional finance, using it in combination with smart contracts raises the treat to the next level. Batching several trading transactions into a single proxy contract allows the arbitrageur to execute the trades in an atomic way. This provides the advantage of executing either a successful arbitrage or paying only minimal fees for the unsuccessful contract execution. Here, users benefit from the atomicity of smart contract execution similar to flash loans, as explained in Section II-B.

It is tempting to think that frontrunning and priority gas auctions only affect application-layer security. Unfortunately, Daian et al. [47] showed that application-layer attacks pose a threat to consensus-layer security as well. Rational consensus nodes might be incentivized to hold blocks back, fork the main chain or even rewrite history. Although for the latest attack, the miner must comprise enough mining power, depending on the values gained by rewriting, it might be profitable to do so.

Another attack vector described by Qin et al. is based on the usage of flash loans (cf. Section II-B). However, flash loans cannot be considered as clearly benign or malicious. Instead, it depends on the borrower’s intention. Qin et al. explored use cases of flash loans as well as attacks exploited on the Ethereum blockchain [66]. One attack named pump and arbitrage uses flash loans to manipulate exchange rates at one DEX in order to create an arbitrage opportunity.

A similar attack was based on the manipulation of DEX prices, which are used as price oracles by a lending service. By trading for a high volume of sUSD token at two DEXes, another lending platform that uses these DEXes as price oracles act accordingly and decrease the exchange price for sUSD. In the next step, the attacker converts ETH (Ethereum token) to sUSD for the lower price. Finally, all sUSD are exchanged against ETH at a lending platform using the undistorted exchange rate. As a result, the attacker possessed a lot more ETH than before this attack. As already pinpointed, flash loans do not open up new attacks in the DeFi space but rather amplify these attacks since no collateral is required to execute them. Qin et al. name starting points for potential defenses, e.g., DEX might reject any trades based on flash loans, or a delay between different actions like price oracle requests and updates could be introduced.

Finally, due to the high interest in DeFi, the system becomes more and more attractive to attacks and scams. In September 2020, it was revealed that the FEW token was orchestrated as a pump and dump scheme. Influencers distributed information about this token to trigger other users to invest in the token. Once the token price was high enough, the core investors sold their shares to gain a high return on investment.

 

Resource:

Regulation

Creating global uniform standards for the regulation of crypto-economics could alleviate risks like censorship or collusion but are effectively nonexistent as of today. Most existing regulatory concepts are yet primarily concerned with the classification of tokens for taxation purposes. Liechtenstein and United States authorities act as global role models in doing so, and overall, regulators have increased clarity by following their example. For DeFi, it is yet unclear how generated income is regulated. The legal status of the entire ecosystem as such is not clearly defined. Questions about the potential for abuse or illicit usages arise. However, it is often unclear if the ecosystem can even face a shutdown. Penalizing certain usage is hard due to the aspects of self-reliance and decentral finalization of transactions. There is a significant gap between governance and external regulation to fill concerning DeFi on Ethereum. Moreover, the lack of know your customer (KYC) processes in DeFi ecosystems makes it harder for regulators to accept it as an official financial space. KYC practices can barely be enforced. As a consequence, regulators are confronted with the great challenge of not inhibiting innovation too strongly when regulating DeFi states that a balance between legal and technical code sustains interactions of different dimensions (economic, political, social) without harming the community.

In September of 2020, the European Commission presented a draft for the regulation of “crypto assets” (digital, blockchain-based assets), which is expected to be in force by 2023. The regulation “Markets in Crypto-assets” (“MiCA”), which is directly applicable for all European member states, describes the most extensive regulation of digital assets to date. As for DeFi, it is not yet clear which consequences this draft brings. While the proposal covers most types of crypto assets and categorizes them differently, DeFi tokens are not explicitly dealt with. The DAI stablecoin can be classified as a so-called asset-referenced Token according to the draft. The classification is justified by the soft peg to the US Dollar. Still, lots of tokens and contracts can be considered “issuer- less”. This is a key issue in this context. It is likely that smart contracts in the DeFi space can be classified as crypto asset service providers at some point. However, conclusive legal research has to

On- And Offramping

Usability and user experience can determine the fate of projects. As DeFi was initially designed from crypto-natives, it was also designed for them. By now, the design of several dApps has significantly improved. However, the terms of use are frequently explained on a high technical level or deeply embedded in financial jargon. In the longterm, this poses a threat to the mass adoption of several DeFi projects. A possible solution can be to guide inexperienced users through the workflow in a more tutoring way, displaying implications in the process (while providing a link to an explanation).

On- and offramps refer to the methods to exchange tra- ditional assets for crypto-assets and vice versa. Centralized exchanges are based on trust in an intermediary, require authentication via KYC practices, have limited scalability, suffer from security issues, process transactions off-chain and charge significant fees. Many of these shortcomings are equivalent to limitations that traditional banks face. The leading centralized exchanges are Coinbase, Binance and Kraken. To enable seamless on- and offramps, these companies must evolve significantly to satisfy all customers’ requirements.

Read more: https://trading-u.com/ecampus/defi-security-challenges-big-picture-concerns

Get DeFi insights in our Facebook Group- Join Now!

Comments are closed.