Automated Risk Assessment
Aug 4, 2023
Decentralized Financial Intelligence
In the last decade, Decentralized Finance (DeFi) has emerged as one of the most prominent use-cases of blockchains, in particular Ethereum. By embedding financial logic within open and verifiable smart contracts, DeFi paves the way towards a vision of transparent and permissionless finance.
However, for financial infrastructure, the decentralized and open nature of public blockchains gives rise to significant risks and limitations aside from the benefits. Smart contracts on the blockchain are censorship-resistant and tamperproof, which means they cannot be shut down or changed by any single entity. While this is generally a signifier of resilience, as a consequence it is notoriously difficult to react to potential threats such as a malicious agent making contract calls to drain depositors' funds. These vulnerabilities necessitate smart contract developers to reduce complexity of their code, to an extent that significantly limits the design space for safe and useful decentralized applications.
Algorithmic Risk Assessment in Web3
The existing risk assessment frameworks in DeFi (and Web3 more generally) currently employ rudimentary, rule-based strategies to limit risks and vulnerabilities in order to mitigate biases and prevent potential manipulations of protocols. Whilst these mechanisms maintain a basic level of integrity and fairness, they fall short in providing comprehensive, nuanced, and dynamic risk assessment that can lead to actionable insights. This is especially apparent when compared to traditional finance, which has established complex risk management systems, often with third parties providing real-time scoring for compliance contexts.
Despite present limitations, blockchain’s inherent auditability offers a unique opportunity for comprehensive risk modelling in DeFi using advanced machine learning (ML) models. The sheer volume of data, generated in real-time and constantly growing, provides a rich resource for ML algorithms: in particular those that require large datasets such as deep learning models. The immutability of blockchain data ensures that ML models have accurate and consistent information, enhancing the trustworthiness of their outcomes.
The variety of transaction types recorded on the blockchain allows for a wide range of ML applications, from market analysis to fraud and outlier detection. The temporal nature of blockchain data makes it particularly well-suited for training models to predict market trends and events. Building upon this, the transparency and traceability inherent in DeFi transactions provide clear, verifiable inputs and outputs for ML models, reinforcing their credibility. As a result, the natively available, granular data from DeFi can be leveraged to build robust ML models for diverse applications. These models can help anticipate market movements, assess credit risk based on user transaction history, or detect risky activity, all in (near) real-time, thereby enhancing the efficacy and responsiveness of DeFi systems to changing conditions.
Leveraging machine learning, it is possible to devise sophisticated, objective, and dynamic risk assessment models. Informed by high-dimensional data, these models can effectively capture the complex and non-linear relationships often present in financial datasets. These capabilities considerably outstrip those of today’s relatively static rule-based mechanisms in DeFi, which often fail to respond to fluctuating market conditions and the industry's dynamic nature.
Yearn <> Giza Collaboration: Trustless Inference for Robust Risk Management
With the goal of bringing advanced risk assessment to Web3, Giza and Yearn will be collaborating on a proof-of-concept leveraging verifiable ML to evaluate automated Yearn strategies. Specifically, with Yearn Vaults V3 launching soon, this collaboration will explore the implementation of permissionless ML-driven methods to evaluate risks associated with yield-aggregation strategies at the heart of Yearn’s offering.
The embedding of automated intelligence within Decentralized Finance paves the way for dynamic and comprehensive risk assessment processes. Leveraging trustless access to market data, sophisticated ML models can be developed to replace the existing rules-based frameworks. Giza is excited to collaborate with Yearn on a proof-of-concept implementation for automated risk assessment models. This collaboration holds potential to enhance both capital security and efficiency for Yearn, heralding a new era of algorithmic risk management in DeFi.
Yearn V3: Motivation & Design
Yearn V3 aims to enhance system robustness and facilitate a path towards further decentralization of strategy whitelisting and debt allocation, while preserving Yearn’s core product: yield-bearing tokens that streamline yield farming for users. While V3’s initial features will reflect those of V2, it is designed to fortify Yearn’s Vaults and bring significant improvements to the code base. These include increased modularity, improved Strategy-Vault relations such as locking funds, and more versatile, volatile and/or multi-chain strategies.
Yearn's long-term objectives include: bolstering protocol & capital security, lowering barriers to new strategy development, accommodating more diverse strategies, enabling access to multi-chain liquidity, achieving immutability without migrations, making strategy creation permissionless, and automating debt allocation. These goals will be realized through a modular architecture that distinguishes between the fundamental logic — such as deposits, accounting, and roles — and the advanced logic including optimized debt allocation, strategy whitelisting, and dynamic fees.
Giza & Verifiable Model Development
At Giza, we are building open-source machine learning solutions to provide trustless and scalable AI capabilities on the blockchain. We have developed verifiable mechanisms for running ML models off-chain, proving the integrity of those operations with zero-knowledge cryptography, and consuming the verifiable outputs within trustless applications that serve a wide range of use cases.
Within the scope of our collaboration with Yearn, the primary goal is to create a verifiable ML pipeline for risk assessment of DeFi strategies and Vaults, with the vision of having every step fully automated and integrated into the Yearn protocol as a Smart Module. Yearn currently employs manual scoring to quantify and assess the risk level of each strategy and Vault. Giza’s solution aims to automate the majority of manual procedures involved in risk calculation by using on-chain machine learning models in a reliable, efficient, and secure manner.
Giza’s solution involves automating data collection from eight risk characteristics and developing a machine learning model to compile these parameters into a comprehensive risk score for Yearn, utilizing provable off-chain computation for the inference and on-chain validation of the generated proof. Thanks to rapid advancements in zero-knowledge cryptography, we are able to extend trustless execution to highly performant, purpose-built computational environments with proof verification on-chain for cost-effectiveness. Practically, Giza can prove the integrity of ML operations and use the verifiable outputs produced in applications such as Yearn’s DeFi protocols.
Our model will infer the risk score whenever a new strategy is proposed or when there is a shift in risk parameters requiring human intervention (e.g. code review, complexity, team knowledge) to recalculate the comprehensive score. The model will recalculate scores periodically to ensure they remain up to date as market conditions evolve.
The Giza and Yearn collaboration signifies a potential paradigm shift in the capabilities available to manage DeFi's inherent risks. By integrating AI-powered risk assessment, we can move towards a fortified DeFi ecosystem that can nimbly navigate the unique risk landscape intrinsic to this domain.
We are deeply excited to make this announcement public, as we hold a firm belief that the combination of verifiable ML and DeFi signify a revolution for financial systems at large. Our proof-of-concept is designed to render explicit the potential capabilities of verifiable machine learning for DeFi protocols, marking a crucial milestone in this intersection of vanguard technologies. As Giza navigates this novel terrain, we are excited to be working with builders who bring substantial insights and deep experience to the table.
To learn more, connect with us on our channels for updates and join our Discord community.
See what others are building with Giza.