Artificial Intelligence in DeFi

The Impact of Artificial Intelligence in Decentralized Finance (DeFi)

Let’s take a look at the widespread application and potential impact of AI and LLM in the cryptocurrency field.

Written by: DEFI EDUCATION

As you may have seen on Twitter, we are very interested in the current AI and LLM field. While there is still much room for improvement in accelerating research, we see the potential in it.

The emergence of Large Language Models (LLM) in the cryptocurrency field is completely changing the way non-technical participants interact, understand, and contribute to this industry.

In the past, if you didn’t know how to program, you would feel completely lost. Now, large language models like chatGPT bridge the gap between complex programming languages and everyday language. This is important because the cryptocurrency field is primarily dominated by individuals with technical expertise.

If you come across content that you don’t understand or think a project is intentionally obscuring the true nature of its underlying systems, you can ask chatGPT and get quick, almost free answers.

DeFi is democratizing access to finance, and large language models are democratizing access to DeFi.

In today’s article, we will present some ideas on how we think large language models can have an impact on DeFi.

1. DeFi Security

As we have pointed out, DeFi is changing financial services by reducing friction and indirect costs, as well as replacing large teams with efficient code.

We have extensively covered the development directions of DeFi. DeFi:

  • Reduces friction costs – gas fees will eventually decrease

  • Reduces indirect costs as there are no physical locations, only code

  • Reduces labor costs as you replace thousands of bankers with 100 programmers

  • Allows anyone to provide financial services such as lending and market-making

  • DeFi is a more streamlined operating model that does not rely on intermediaries to execute.

In DeFi, “counterparty risk” is replaced by software security risk. The code and mechanisms that protect your assets and facilitate your transactions are constantly at risk from external threats trying to steal and exploit funds.

AI, especially LLMs, play a critical role in the development and auditing of automated smart contracts. By analyzing code repositories and identifying patterns, AI can (over time) discover vulnerabilities and optimize the performance of smart contracts, reducing human errors and increasing the reliability of DeFi protocols. LLMs can highlight risk areas by comparing contracts with a database of known vulnerabilities and attack vectors.

One area where LLMs have become a feasible and accepted solution to software security issues is in helping to write test suites. Writing unit tests may be tedious, but it is an important component of software quality assurance that is often overlooked due to time constraints.

However, there is also a “dark side” to this. If LLMs can help you audit code, they can also aid hackers in finding ways to exploit code in the encrypted open source world.

Fortunately, the encryption community is filled with white hat individuals and has a bounty system that helps mitigate some of the risks.

Cybersecurity professionals do not advocate for “ensuring security through obfuscation.” Instead, they assume that attackers are already familiar with the system’s code and vulnerabilities. AI and LLMs can help automatically detect insecure code at scale, especially for non-programmers. The number of smart contracts deployed daily exceeds what humans can audit. Sometimes, to seize economic opportunities (such as mining), interaction with new and popular contracts is necessary without waiting for a testing period.

This is where platforms like Rug.AI come into play, providing an automated assessment of new projects for known code vulnerabilities.

Perhaps the most revolutionary aspect is the ability of LLMs to assist in code writing. As long as users have a basic understanding of their requirements, they can describe what they want in natural language, and LLMs can convert these descriptions into functional code.

This lowers the barrier for creating blockchain-based applications, allowing a broader range of innovators to contribute to the ecosystem.

This is just the beginning. We personally find that LLMs are better suited for refactoring code or explaining code to beginners rather than for entirely new projects. Providing context and clear specifications to your model is crucial, or else there will be a case of “garbage in, garbage out.”

LLMs can also help those who are not familiar with programming by translating smart contract code into natural language. Perhaps you don’t want to learn to code, but you do want to ensure that the code of the protocol you are using aligns with its promises.

Although we doubt that LLMs can replace high-quality developers in the short term, developers can use LLMs to conduct another round of rational checks on their work.

Conclusion? Cryptocurrency has become simpler and safer for all of us. Just be cautious not to overly rely on these LLMs. They can be overconfident and make mistakes at times. The ability of LLMs to fully understand and predict code is still evolving.

2. Data Analysis and Insights

When collecting data in the cryptocurrency field, you will inevitably come across Dune Analytics. If you haven’t heard of it yet, Dune Analytics is a platform that allows users to create and publish data analytics visualizations, with a primary focus on the Ethereum blockchain and other related blockchains. It is a useful and user-friendly tool for tracking DeFi metrics.

Dune Analytics now has GPT-4 capabilities, which can explain queries using natural language.

If you’re confused about a particular query or want to create and edit one, you can turn to chatGPT for assistance. Note that providing some example queries within the same conversation will enhance its performance, and you’ll still want to learn on your own to validate chatGPT’s output. However, it’s a great way to learn while asking, like consulting a mentor.

LLMs significantly lower the barrier of entry for non-technical cryptocurrency participants.

However, in terms of insights, LLMs can be disappointing. In complex and rational financial markets, don’t expect LLMs to provide accurate answers. If you’re someone who acts on intuition and gut feeling, you’ll find that LLMs fall far short of your expectations.

Nevertheless, we have found a useful application – checking for overlooked obvious things. You’re unlikely to discover non-obvious or contrarian insights that can actually generate returns. This isn’t surprising (if someone develops AI that brings super high market returns, they won’t release that to a wider audience).

3. “The Disappearance of Discord Moderators?”

In the cryptocurrency space, managing a group of users passionate about a popular project with ever-changing demands is an underrecognized and painful job. Many common questions are repeatedly asked, sometimes in a continuous stream. This seems like a pain point that LLMs should be able to easily address.

LLMs also show a certain level of accuracy in detecting self-promoting messages (spam). We expect this can be used for detecting malicious links (or other hacking activities) as well. Managing a busy Discord group with thousands of active members and regular information updates is indeed challenging, so we look forward to some Discord bots supported by LLMs providing assistance.

4. “Wild Ideas”

An often-used joke in the cryptocurrency space is launching a meme-based coin based on something that has become popular. These range from persistent memes like DOGE, SHIB, and PEPE, to random currencies that disappear within an hour based on that day’s hot keywords (mainly scams, which we avoid getting involved in).

If you have access to the Twitter Firehose API, you can track cryptocurrency sentiment in real-time and train an LLM to tag trends, then use humans to interpret the subtle differences. One simple application example is that when a viral moment occurs, you can launch a meme coin based on sentiment analysis.

Perhaps there are ways to build a budget version of sentiment scrapers that monitor influential cryptocurrency figures across multiple social media channels without the cost and bandwidth of dealing with “rocket-launch” type API data sources.

LLMs are great for this because they can delve into the context (analyzing sarcasm and humor online to derive real insights). This LLM partner will evolve and learn alongside the crypto industry, discussing most of the actions on Crypto Twitter. The crypto industry offers a unique environment for LLMs to capture market opportunities with its open debate forums and open-source technology.

However, to avoid being fooled by deliberate social media manipulation, this technology needs to become more complex: artificial grassroots movements, undisclosed sponsorships, and online trolls. In another article, we covered an interesting third-party research report that suggests some entities may be consciously manipulating social media to increase the value of crypto projects associated with FTX/Alameda.

NCRI analysis reveals that robot-like accounts occupy a significant portion (approximately 20%) of online discussions mentioning FTX-listed currencies.

This robotic activity foreshadows the prices of many FTX currencies in the data pool.

After the promotion of FTX, the activity of these currencies became increasingly unreal over time: the proportion of unreal, robot-like comments steadily increased and accounted for about 50% of the total discussion.

We will continue to update Blocking; if you have any questions or suggestions, please contact us!

Share:

Was this article helpful?

93 out of 132 found this helpful

Discover more

Blockchain

Proof of Life: Why is Bitcoin a living being?

How to prove that you are not a piece of code to read an article? This is a very interesting question. Will you be a ...

Blockchain

Babbitt Column | What are the improvements in the three major branches of Bitcoin in 2019?

BTC is now fully developed by the Bitcoin Core development team, and all protocol level changes can be seen in the Bi...

Blockchain

The essence of high-end dialogue: How to understand the meaning of blockchain and bitcoin?

On May 27th, the high-end dialogue on the theme of “blockchain – the cornerstone of digital civilizatio...

NFT

Bitcoin Flips Ethereum in Transaction Fee Frenzy

Bitcoin Transaction Fees Surpass Ethereum Amidst Increased Demand for Ordinals NFTs and BRC-20 Tokens

Blockchain

Bitcoin development has made new progress. Core developers propose to modify the logic of Bitcoin transaction replay to better transaction privacy.

Bitcoin Core developer Amiti Uttarwar is working on modifying Bitcoin's network replay logic to introduce more p...

Blockchain

Demystifying 9 Myths About Bitcoin

Not long ago, Bitcoin celebrated its 11th birthday. Whether you are a supporter or opponent of Bitcoin, you cannot de...