How DECO Enables Undercollateralized DeFi Lending: A Proof of Concept With Teller

A fundamental pillar of any financial system is the ability to lend and borrow assets. Borrowers need immediate access to working capital while lenders earn yield on their otherwise idle capital.

However, blockchain-based financial markets—commonly referred to as decentralized finance or simply DeFi—often involve users who are only identifiable by pseudoanonymous addresses. To account for this unique dynamic around limited credit reputation, DeFi lending markets are typically overcollateralized, meaning borrowers need to deposit collateral in excess of the loan’s value. For example, a borrower may have to deposit \$150 of ETH as collateral to borrow \$100 of USDC. This overcollateralization ensures that if a borrower fails to pay back their debt, the collateral can be liquidated to make lenders whole—a foundational mechanism to maintain solvency. 

The downside of overcollateralized lending is that borrowing isn’t capital efficient and limits the growth of the market. Overcoming this limitation in DeFi requires undercollateralized lending protocols, which can access reliable creditworthiness information to determine risk profile of borrowers without revealing sensitive information on blockchains. Fortunately, this is becoming possible due to technological breakthroughs such as DECO—a privacy-preserving oracle protocol currently under development. Notably, DECO uses zero-knowledge proofs to attest to off-chain information without making it publically viewable on-chain or even to the oracles themselves.

In this article, we’ll demonstrate why undercollateralized lending is the next frontier for DeFi and how DECO provides the secure off-chain infrastructure necessary to overcome key challenges in undercollateralized lending regarding data privacy. We also showcase a proof of concept between Teller and Chainlink Labs in which DECO was used in an alpha test to prove in zero-knowledge the existence of a minimum off-chain bank account balance, ultimately enabling Teller to reduce the collateral requirements for DeFi loans. 

The Expansive Market for Undercollateralized Lending

While overcollateralized lending is the status quo in DeFi, loans in traditional finance are often undercollateralized or even fully uncollateralized in the form of unsecured loans. Typically, this takes the form of personal loans, student loans, and credit cards. For instance, when a consumer makes a purchase with a credit card, they are borrowing funds uncollateralized from a bank and settling at a later date. 

With over 485 million issued credit cards, 43 million student loans, and 20 million personal loans in Q4 2021, the market for unsecured debt is a massive part of the US economy. In Q1 2022, the unsecured personal loan market in the US alone totaled $178 billion, greater than the entire value locked in DeFi and an order of magnitude greater than the value locked across all DeFi lending protocols today.

Unsecured personal loans in the United States
The market size for unsecured personal loans in the United States (source)

Introducing undercollateralized lending into DeFi at scale would enable a massive amount of economic value to enter the ecosystem. Rather than dealing with the friction of borrowing capital from centralized intermediaries, consumers can take loans from decentralized applications in minutes with nothing more than an Internet connection. With smart contracts reducing the counterparty risk of financial platforms, lenders can generate a greater yield on their capital and borrowers can be provided loan terms with superior capital efficiency without the fear of discrimination. 

The Challenges of Undercollateralized Lending in DeFi

Undercollateralized lending is inherently more risky for lenders since the collateral of borrowers is not sufficient to cover the entire loan. Thus, some form of trust in the borrowers’ ability to pay back the loans is required. Given the pseudonymous nature of DeFi participants, determining which borrowers are safe or risky to lend to is a daunting task. 

To support a robust undercollateralized lending market, lenders need to have information on the creditworthiness of borrowers. Creditworthiness data can range from proof of identity and credit scores to bank account balances and repayment history. The more data made available to lenders, the more borrowing rates and collateral requirements can be optimized to fit certain risk tolerances. However, most creditworthiness data resides off-chain in traditional databases, which are not natively accessible to smart contract applications. 

Thus, DeFi needs to make use of oracles like Chainlink to securely fetch off-chain data and deliver it on-chain. Importantly, oracles allow such data to be used in a programmatic way by smart contracts, such as checking the borrower’s eligibility for a loan without needing any manual input from lenders or modification of the processes used by credit agencies. 

Getting data on-chain is only half of the equation though when it comes to undercollateralized lending in DeFi. Since blockchains are public immutable ledgers, any data published on-chain is immediately available for all the world to see. Without an assurance of privacy regarding the visibility and handling of their personally identifiable information (PII), most consumers are unlikely to engage with undercollateralized DeFi lending markets. In parallel, most traditional institutions would not be able to participate due to business and legal constraints such as GDPR. 

DECO: A Privacy-Preserving Oracle Protocol Enabling On-Chain Undercollateralized Lending

DECO—a privacy-preserving oracle technology developed at Cornell University and later acquired by Chainlink—allows data transmitted over the Internet to be confidentially attested to by oracles without the data being revealed to the public or to the oracle nodes themselves. This solves a large limitation with existing web communication standards such as HTTPS/TLS, where users can privately communicate with a web server but cannot prove to third parties the provenance of data. 

Through the use of zero-knowledge proofs (ZKPs) with an oracle present in real-time, DECO allows users to prove to an oracle that a piece of data accessed via a TLS web session came from a particular API or website while restricting the amount of data revealed. DECO is backward compatible with existing versions of TLS, meaning a vast scope of possible data sources can be supported since no modifications are required to the web servers hosting user data. Technical details on DECO can be found in the whitepaper, co-authored by Chainlink Labs Chief Scientist Ari Juels.

With DECO, information about borrower creditworthiness can be proven without concerns around data privacy. Crucially, users are able to keep sensitive information like their name, financial status, and data access credentials private, while proving derived claims about themselves. Claims are achieved by proving a certain value exceeds a threshold using a cryptographic proof, rather than publishing the data itself on-chain. For example, borrowers could use DECO to prove that their credit score, as determined by an established credit bureau, exceeds a specific threshold without revealing the exact credit score. Not only does it allow borrowers to prove they meet minimum loan requirements while revealing only the minimum amount of necessary information, but borrowers can prove that the data was sourced from authoritative sources and was not tampered with during the verification process.

Chainlink DECO diagram
DECO uses zero-knowledge proofs to privately attest to personal information stored in off-chain databases.

DECO Proof of Concept With Teller

Chainlink Labs recently engaged in a series of alpha test proof of concepts with key partners to validate the functionality and viability of DECO in various smart contract use cases. DECO was used in the PoCs to generate ZKPs that proved facts about sensitive information, which was sourced from a range of different data providers, all without compromising on data privacy or requiring server-side modification by data providers.  

One of these PoCs was with Teller, a DeFi protocol marketplace for digital asset lending that supports undercollateralized loans. Teller used the DECO protocol to prove that the sum of a user’s off-chain bank accounts had a balance exceeding a dynamic threshold specified by the requested loan amount. If the sum of a user’s account balances exceeds the threshold, then their risk profile as a borrower would be reduced, allowing for significantly lower collateral requirements for loans. For example, if a borrower requested a loan of \$5,000, then the user would have to prove that they hold at least \$5,000 US dollars in their bank account to showcase their ability to repay the loan.

To generate this proof, a test user first logged into their bank via Plaid—a developer-focused financial services company—to generate an authentication token. This token was then passed to a DECO Prover instance as a private input to query the Plaid API. The following computation was then run by the DECO Prover:

Sum(Query(".report.items[].accounts[].balances.current")) > ${LOAN_AMOUNT}

After the data was queried, the DECO Prover generated a ZKP to prove to the DECO Verifier, which is present in real-time, that the user’s bank account balance met the minimum required threshold while at the same time proving data was legitimately sourced from the Plaid API. After receiving and verifying the cryptographic proof, the DECO Verifier then locally generated an attestation that was sent back to the DECO Prover at Teller to complete the process. In an in-production setting, this attestation could be sent on-chain to a smart contract application.

Teller DECO proof of concept
DECO enables borrowers to prove their off-chain bank account balances exceed a predefined threshold.

In this PoC, the DECO Prover instance was deployed by Teller while the DECO Verifier was deployed by Chainlink Labs. In future iterations, it is planned that the DECO Prover can be deployed locally by the end-user or in a Trusted-Execution Environment (TEE) while the DECO Verifier can be deployed by a decentralized oracle network in order to increase trust-minimization guarantees.

This successful alpha test PoC demonstrated DECO’s ability to generate ZKPs regarding borrower creditworthiness while maintaining data privacy in the context of real-world use cases like undercollateralized lending. The next stage is for attestations to be made available on-chain, so smart contract applications such as Teller can rely on specific creditworthiness information about users in zero-knowledge, supporting the growth of undercollateralized lending in DeFi. With the Chainlink Core client having been used extensively and time-tested in-production for over three years, facilitating the on-chain delivery of attestations from the DECO protocol is a seamless process. 

“This proof of concept between Teller and Chainlink Labs showcased the true power of the DECO protocol and how privacy-preserving oracle technology can enable trillions of dollars in untapped value to be brought on-chain via undercollateralized lending. We’re excited to continue working with Chainlink on the development and refinement of the DECO protocol.” –Teller Finance CEO, Ryan Berkun.

“DECO is an innovative new technology that enables smart contracts to serve even more powerful use cases in a truly privacy-preserving manner. This proof of concept with Teller successfully demonstrated how the application of academic research can be applied to real-world use cases. We are excited to continue our collaboration with Teller on their use of DECO and look forward to making DECO available to the broader community.” –Chainlink Labs Chief Research Officer, Dahlia Malkhi. 

Conclusion

Introducing undercollateralized lending into the DeFi ecosystem represents an opportunity to serve a massive global market and onboard millions of people into the financial economy. Through the DECO protocol, on-chain lenders will be able to make better-informed decisions about creditworthiness while borrowers can maintain privacy over their personal information. Undercollatearlized lending is just one of the many smart contract use cases that privacy-preserving oracles such as DECO can enable in Web3

To learn more about Chainlink, subscribe to the Chainlink newsletter and follow the official Chainlink Twitter to keep up with the latest Chainlink news and announcements.

Need Integration Support?
Talk to an expert
Faucets
Get testnet tokens
Read the Docs
Technical documentation