Spectral Using Custom Chainlink Oracle to Calculate On-Chain Credit Score

Spectral Using Custom Chainlink Oracle to Calculate On-Chain Credit Score

We’re excited to announce that Spectral — a protocol for programmable creditworthiness — has built a custom Chainlink oracle solution to power its Multi Asset Credit Risk Oracle, or MACRO score for short.

A user’s MACRO score is calculated using many different pieces of on-chain transaction data including payment history, liquidation history, amounts owed and repaid, credit mix, and length of credit history. By harnessing the transparency of blockchain data, lenders can get an insightful view of users’ creditworthiness, and borrowers can more easily access financial opportunities based on their on-chain transaction history. Verifiable computation is leveraged to create a system that does not rely on users’ trust in the fairness of the credit-scoring mechanism itself.

The result of the MACRO score calculation introduces the concept of Non-Fungible Credit (NFC). NFCs allow users to bundle wallets and sync their on-chain transactional history into a single ERC-721 composable asset, which acts as a representation of their DeFi behavior. By disintermediating existing institutions and adding transparency to the calculation of credit scores, users can take back control of their identity by leveraging their on-chain activity as a credit score to receive personalized loan terms.

Thanks to the inherent transparency of public blockchains like Ethereum, the dataset at our disposal is substantially broad, comprising all the on-chain borrowing behavior recorded on some of the leading DeFi protocols since their inception, including Compound, Aave, and MakerDAO. Additionally, several other data points related to an address’ transaction history can be incorporated.

Instead of building our own oracle infrastructure, we opted to build it on top of Chainlink with the help of their team. Calculating the MACRO score involved creating a set of Chainlink External Adapters — functions that allow Chainlink oracles to extract data from particular APIs and perform custom computations on the data before delivering it on-chain. Through the Chainlink External Adapters, we can collect on-chain data, perform data analysis on it to calculate a user’s credit score, and then deliver it on-chain in a highly secure and reliable manner.

The MACRO score calculation is done using the following Chainlink External Adapter:

  • a single adapter that calls all provider APIs, retrieves scores and outputs a user’s credit bucket (or tick)

Future versions of our protocol could include the following as we decentralize the scoring mechanism:

  • an “aggregator” adapter that calls other adapters, each responsible for a single provider API call
  • multiple adapters, each responsible for a single provider API called and aggregated on-chain

While Chainlink is widely known throughout DeFi for pre-built Price Feeds, we are thrilled to demonstrate how Chainlink is a highly flexible substrate for creating custom oracle solutions like Spectral’s MACRO score. Most notably, Chainlink oracle infrastructure can access any API, aggregate data using any custom computation, and utilize a network of nodes configured to various trust assumptions and levels of decentralization.

We believe this is the first implementation in an ongoing evolution of how on-chain data can be used to generate creditworthiness, as well as be combined with off-chain data and trust-minimized computations to extract valuable insights.

“The flexibility of Chainlink enabled us to build a custom solution for calculating a reliable and reproducible on-chain credit score based on past Ethereum transaction activity,” stated Sishir Varghese, Founder of Spectral Finance. “Through MACRO scores, DeFi protocols can begin to gain insights into users without users having to give up personal information, opening up new possibilities for the industry with a new application layer of a permissionless credit risk ecosystem.”

About Chainlink

Chainlink is the industry standard oracle network for powering hybrid smart contracts. Chainlink Decentralized Oracle Networks provide developers with the largest collection of high-quality data sources and secure off-chain computations to expand the capabilities of smart contracts on any blockchain. Managed by a global, decentralized community, Chainlink currently secures billions of dollars in value for smart contracts across decentralized finance (DeFi), insurance, gaming, and other major industries.

Chainlink is trusted by hundreds of organizations, from global enterprises to projects at the forefront of the blockchain economy, to deliver definitive truth via secure, reliable oracle networks. To learn more about Chainlink, visit chain.link and subscribe to the Chainlink newsletter. To understand the full vision of the Chainlink Network, read the Chainlink 2.0 whitepaper. Want to discuss an integration? Talk to an expert.

Solutions | Docs | Twitter | Discord | Reddit | YouTube | Telegram | GitHub

About Spectral

Spectral Finance creates a programmable creditworthiness ecosystem facilitating capital efficiency on-chain through credit risk analysis. As it exists today, creditworthiness in traditional financial markets is static and imposed by opaque institutions. Siloed and monopolized, users have very little control or perspective on their credit. In addition, implementations and applications for creditworthiness are encumbered by its lack of composability. As Ethereum harnesses smart contracts and a blockchain to pursue the idea of programmable money, we build upon Ethereum’s innovations and set out to achieve the same goal for programmable creditworthiness and reputation.

On-chain transactional history as a composable asset introduces a new primitive beyond financial applications across the web3 ecosystem.

Join the Spectral Community:


Discord: https://discord.gg/spectralfinance

Twitter: https://twitter.com/__spectral

Medium: https://medium.com/@spectralfinance