Spectral Finance: Creating a DeFi credit risk assessment layer, Disintermediating it, and Protecting it

TLDR

  • 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.

Background

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.

Core Problem

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?

Solution to the Problem(s)

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.

Further Reading

14 Likes

Can anyone think of any incentivized, decentralized networks that are working well? How far along is The Graph?

1 Like

Thank you for posting this, @jmcgirk. I’ve been thinking on it a few days now. There is a lot to unpack here, so I’m hoping we get that opportunity, but my initial thinking has to do with identity. In traditional finance, those FICO scores or other scores can pretty strongly be tethered to an individual. There are benefits and drawbacks to that, of course, but it does mean that in that system I can’t abandon my bad credit score. At least, I can’t do that easily. It seems like the MACRO score might be more strongly tethered to a wallet as opposed to an individual, however. That might be a misreading on my part, but it seems as though it would be possible to abandon a wallet/score readily in the defi ecosystem.
I can actually see some advantages to that. It’s essentially what bankruptcy allows to happen in traditional finance, though in a much more systematic and arduous process. There are many disadvantages to that as well, obviously. Before digging into this more though, I just want to make sure that the problem I’m thinking of is actually a problem though. Looking forward to your thoughts!

6 Likes

Thanks @jmcgirk For this interesting summary is more like an eye opening in the world of finance in creating a Defi credits risks assessment layer. In the world of finance, risk management is of the utmost importance, Assessing risk is the process where you identify what hazards can occur, how likely they are to happen, and how you can best prevent them.A decentralized credit score would allow web3 users the opportunity to engage in an alternative and potentially “more equitable” risk infrastructure, Given the current structure of creditworthiness today, users have little control over their scores.The fresh capital will be used to build out its credit scoring network and scale it over time. “We cover the majority of DeFi right now, but if we end up in a multichain world, new lending protocols will emerge and we’ll adjust data from there,” . “As these data sets increase in size, more and more users will be attracted to web3.”My question is, what is the possibility that the web3 will not collapse and how do we prevent this in future.

1 Like

This post was flagged by the community and is temporarily hidden.

How is Spectral accounting for multiple wallets across numerous blockchains, if at all? I might be a heavy user with one wallet while opening a new wallet for a specific or large transaction - whether to protect my privacy or increase my security.

Interesting to think about credit scores on chain. The current system of credit scoring can either disenfranchise some borrowers or threaten the financial health of those that become over-leveraged. I think that’s really the problem to solve for but nice to see the tech they’re developing.

3 Likes

In conventional finance, banks are flexible n

Defi provides services that are comparable to those offered by traditional finance and has well-known weaknesses. Leverage, liquidity mismatches, and their interplay with profit-seeking and risk-management strategies are the fundamental mechanisms that give birth to these vulnerabilities, and they are all well understood from the established financial system. DeFi, however, may be particularly destabilizing due to certain characteristics. As a result of liquidity mismatches, this section primarily focuses on the role of leverage and run-risk in stablecoins.

2 Likes