- Decentralized Finance is plagued with inequality and capital inefficiency because it lacks a creditworthiness assessment layer.
- Traditional Finance has evolved a risk assessment system that is generally accurate but concentrates power into a few companies and offers little recourse for customers who want to opt out.
- By using publicly available on-chain transaction information and a transparent network of machine learning oracles to generate credit scores, web3 has the opportunity to rethink credit risk assessment as a customer-initiated, pseudononymous process.
Decentralized Finance (DeFi) enables trustless transactions between two parties without an intermediary who might skim profits, slow down the process, complicate automation, or interfere with the process. While this is an excellent system for facilitating low-level financial functions like peer-to-peer transfers, DeFi’s trustless nature complicates more sophisticated banking functions such as lending and borrowing.
Pricing a loan properly requires assessing and pricing in risk. Traditional finance has created a sophisticated system of credit, credit intelligence, and credit scoring, the latter element being most recognizable to North Americans as their Fair Isaac & Co (FICO) scores. The problem with traditional credit scoring systems is that they rely on a few credit intelligence gathering companies, aka credit reporting bureaux, such as Equifax, Experian, and TransUnion in the United States. Third-party credit reporting slows the process of credit scoring down, the information gathered isn’t always accurate, e.g. errors are often tricky to resolve and require contacting all three reporting agencies, they provide tempting targets for cybercriminals to attack, and violate user privacy.
This is why porting Tradfi credit scores into DeFi isn’t a good solution. It would mitigate many of the potential benefits of DeFi, especially the speed and privacy.
There are now more than five years of DeFi transactions available online. Spectral Finance’s data science team has been using the information to model the likelihood that a particular wallet be liquidated within 90 days, creating a score roughly equivalent to the FICO but based on blockchain transactions.
The MACRO Score is accurate, but remains an in-house design and essentially a black box to outsiders. For details, Spectral describes the ML data-gathering, modeling, and optimization process for their models in depth here. The medium-term goal is to completely decentralize the Score by allowing anyone to participate in the modeling process.
Spectral finance want to maximize accessibility and accountability, and to do so they want to open the modeling process so that anyone can participate or view the data being used. In other words, they want to decentralize the process.
The solution is to create a network of machine learning oracles that are incentivized to provide accurate results without gaming the system. There are a number of technical challenges:
- How can we use zero-knowledge proofs to safeguard machine learning models that create on-chain scores and protect the integrity of the scoring network?
- How can we best use artificial intelligence over a distributed network?
- How do we best incentivize data integrity while ensuring end-user privacy?
Spectral’s system relies on scorers training machine learning models to classify the risk for a party associated with their transaction activity. Once a model is trained, it should be cryptographically committed to and apply the same rules to every user.
At the credit score generation stage, the scorer is able to prove that the credit score generated by the model (which is cryptographically committed to, ensuring it is the same for all users that are scored) and no other information other than public transaction activity was used for this process.
Zero-Knowledge proofs (ZKPs) allow a prover to prove to a verifier that it knows/has computed some function of an input without revealing everything about the computation itself.
A starting model: ZKP for Decision Trees
The structure of Decision Trees is similar to that of a Merkle Tree and as a result, Zero-Knowledge for Decision Trees can be viewed as an idea that combines Merkle Trees and SNARK proofs at a high level.
Steps to produce a proof that a Decision Tree performs as expected:
- Train the decision tree using the public blockchain activity.
- The next step is to merkle-ize the decision tree. This allows one to cryptographically commit to the decision tree. When a user interacts with the system, they can check using the commitment that the model is committed to before assigning them their credit score, proving that no ad-hoc changes occur to the model causing biases in score classification.
zk-SNARKs are used to hide the particular path in the decision tree to prevent users from collaborating to learn model parameters. The statement proves that there is a valid path in the tree corresponding to the commitment, without revealing the path itself.
Distributed Credit Risk Modeling
With a transparent approach to credit risk modeling, credit scores can be democratized in many ways. As an example, multiple credit scoring organizations can aggregate their scores for any party without revealing their credit risk models to each other. For this, each party needs to provide proofs along with their assigned credit scores to each user. Once Spectral has these verifiable proofs, they can be sure that the scores are consistent with each organization’s models. Since different organizations might have different models, the credit scores they assign to the same party/individual could be different.
Combining these proofs allows for a more holistic approach to credit risk modeling where scores from different models can now be aggregated in the hope of providing a more robust credit risk model. Spectral also requires each model to have a proof of integrity. Proofs of Integrity allow us to ensure that each model performs with high accuracy and does not maliciously poison the aggregate model.