# Decentralized Onchain Microcredit

By [Scott Onchain](https://paragraph.com/@scottonchain) · 2025-01-22

---

_(Cover image credit:_ [_World Bank Flickr_](https://www.flickr.com/photos/worldbank/4886270250)_, used under a_ [_Creative Commons License_](https://creativecommons.org/licenses/by-nc-nd/2.0/)_.)_

**An Onchain Approach to Microcredit**
--------------------------------------

The World Bank estimates that [1.4 billion people worldwide](https://digitalfinance.worldbank.org/) remained excluded from the global financial system, unable to open accounts, secure loans, or build credit histories. For these individuals, the barriers to economic opportunity are immense. Traditional credit scoring relies on access to formal financial data, including bank accounts, payment histories, and income documentation. Unbanked individuals, including entrepreneurs in underserved communities, lack these records, leaving them out of reach of traditional loans.

Microloans, or microcredit, emerged as a solution to provide financial access to underserved populations, particularly in developing economies. These small loans aim to empower entrepreneurs to start and grow businesses, helping alleviate poverty and promote economic independence.

The modern concept of microloans traces back to the 1970s, pioneered by [Dr. Muhammad Yunus](https://grameenbank.org.bd/about/founder), an economist from Bangladesh. His efforts led to the creation of the [Grameen Bank](https://grameenbank.org.bd/), a groundbreaking institution that provided small, collateral-free loans to impoverished individuals. In 2006, Dr. Yunus and Grameen Bank were jointly awarded the [Nobel Peace Prize](https://www.nobelprize.org/prizes/peace/2006/yunus/facts/) for their contributions to economic and social development.

[Kiva](https://www.kiva.org/), founded in 2005, is a global nonprofit organization that connects individual lenders to borrowers worldwide through an online platform. Lenders can contribute as little as $25 to support entrepreneurs in over 80 countries.

While the traditional microloan ecosystem is succeeding in expanding financial services to new populations, it relies heavily on centralized intermediaries to evaluate creditworthiness, distribute funds, and manage repayment. Reliance on such intermediaries introduces inefficiencies, limits reach, and increases costs. Such centralized systems are inherently opaque, eroding trust.

A blockchain approach to microcredit eliminates the need for traditional gatekeepers. Participants directly vouch for each other through onchain attestations. Borrowers build their reputation by repaying loans, which also benefits the attesters who vouched for them.

This algorithmic form of [social underwriting](https://www.kiva.org/businesscenter/what-is-social-underwriting) replaces traditional credit data with social capital as the foundation of trust. Community members attest to the creditworthiness of their peers, and the blockchain provides the system to track and interpret the attestations. The result is a microcredit system with very low friction, which can spread to new populations and bring new efficiency.

**Participants and Roles**
--------------------------

At the core of a decentralized microloan platform are three key participant groups: **Borrowers**, **Lenders**, and **Attesters**.

**Borrowers** are the individuals seeking microloans to fund small businesses, invest in opportunities, or meet personal needs. Microcredit borrowers often lack access to traditional financial services.

Borrowers rely on their communities to vouch for their creditworthiness. Trusted individuals can submit attestations about the borrower’s creditworthiness. Behind the scenes, this is implemented as an attestation on the [Ethereum Attestation Service (EAS)](https://docs.attest.org/docs/welcome).

Each successful loan repayment enhances the borrower’s credit score, and also boosts the credit score of attesters who vouched for them.

**Attesters** are the community members who vouch for borrowers’ creditworthiness.

Attesters vouch for a borrower’s trustworthiness based on personal relationships or community reputation. These attestations feed into the borrower’s credit score, influencing their loan eligibility.

When a borrower pays back a loan, the repayment includes a portion to be divided among attesters for that borrower. The attester’s credit score increases, along with the borrower’s. Conversely, if a borrower defaults, both the borrower’s and the attester’s scores are penalized.

**Lenders** are individuals, institutions, or organizations looking to support financial inclusion while earning returns. Lenders deposit funds into a smart contract, which in turn automates the management of microloans.

**Onchain Mechanism for Microloans**
------------------------------------

The decentralized microloan platform integrates several blockchain mechanisms to create a trust-based microlending system. This design combines attestations, graph-based reputation scoring, and smart contracts to deliver a practical solution for microloans. Here is a technical overview of the system's components and how they work together.

The [Ethereum Attestation Service (EAS)](https://docs.attest.org/docs/core--concepts/how-eas-works) records the attestations to borrowers. On EAS, an attestation recorded as an immutable, cryptographically signed proof that one participant believes in the creditworthiness of another. EAS Attestations typically include the attester's address, the borrower’s address, and a weight $$w(i \\to j)$$ representing the strength of the attestation, from $$0$$ to $$1$$.

The platform uses an adapted PageRank approach to compute reputation-based credit scores. Note that EAS attestations form a directed graph, where nodes represent participants (or addresses), and directed edges run from attesters to borrowers.

As in traditional PageRank, the credit score of each participant is calculated iteratively based on the scores of nodes pointing to it in the attestation graph.

$$C(i) = (1 - d) P(i) + d \\sum\_{j} \\dfrac{C(j) \\cdot w(j \\to i)}{\\sum\_{k} w(j \\to k)}$$

Here:

*   $$i$$ runs over all nodes (addresses)
    
*   $$P(i)$$ is a personalization vector that sums to one across nodes
    
*   $$C(i)$$ is the credit score of node $$i$$, initialized to $$P(i)$$ and calculated iteratively
    
*   $$j$$ runs over nodes with edges to $$i$$
    
*   $$k$$ runs over nodes with edges from $$j$$ (including $$i$$)
    
*   $$d$$ is the damping factor, commonly set to 0.85
    
*   $$C(j)$$ is the credit score of an inbound node $$j$$
    
*   $$w(j \\to i)$$ is the attestation weight of the edge from $$j$$ to $$i$$.
    

$$C(i)$$ is initialized to $$P(i)$$, then computed iteratively until the delta between subsequent iterations is within a threshold.

**Cold Start: Initialization of the Personalization Vector**

The personalization vector $$P(i)$$ affects the output credit score $$C(i)$$, with higher values of _$$P(i)$$_ correlated with higher values of $$C(i)$$. We initialize the $$P(i)$$ vector uniformly at first, increment the $$P(i)$$ score for any special situations, then normalize the vector so that it sums to $$1$$.

1.  Each participant begins with an equal base value (e.g., $$P(i)=1$$).
    
2.  Some participants may be preferred by the system, especially to bootstrap the system in the beginning. Such preferences are represented by incrementing $$P(i)$$. For example, the system may increment $$P(i)$$ for addresses KYC’ed by a bank, or for addresses which are functioning as lenders.
    
3.  After assigning base values and bonuses, the personalization vector is normalized so that the sum across all participants equals 1
    
    $$P'(i) = \\frac{P(i)}{\\sum\_{j} P(j)} $$$
    
4.  The normalized vector $$P(i)$$ serves as both the initial weighting $$C(i)$$ and the personalization vector $$P(i)$$ used within the iterative computation.
    

### Updates to Credit Scoring

Certain events require recomputation of credit scores, such as repayment of a loan or a change to the attestation graph. The system listens for these changes and performs the update. Because a PageRank calculation is too computationally expensive to run directly on the blockchain, it is calculated off-chain on-demand, using an oracle service such as [Chainlink](https://docs.chain.link/chainlink-automation).

A smart contract handles loan issuance, repayment, and credit score updates. When a borrower requests a loan, the smart contract references their on-chain credit score to determine the terms of the loan, which can include the principal amount, the interest rate, and the repayment period. Once the loan terms are verified, the contract disburses funds to the borrower and records the repayment schedule.

Repayment of loans is tracked through the same smart contract. Each repayment updates the borrower’s credit score, reflecting their improved reliability. Similarly, defaults reduce the borrower’s credit score. Any update to the borrower’s credit score back-propagates to the attester.

#### **Mechanism for Score Updates**

If a borrower defaults, it reduces their credit score. This penalty propagates backward, decreasing the scores of their attesters based on their attestation weight. Conversely, a borrower’s successful repayment increases their credit score. This improvement propagates back, boosting the scores of their attesters.

The penalty or reward for an attester is calculated based on the fraction of their contribution to the borrower’s creditworthiness. For attester $$A$$ and borrower $$B$$, the attester’s update is:$$ \\Delta P(A) = \\alpha \\cdot \\Delta P(B) \\cdot w(A \\to B) $$Where:

*   $$\\Delta P(A)$$: Change in the attester’s personalization value.
    
*   $$\\Delta P(B)$$: Change in the borrower’s personalization value (positive for repayment, negative for default).
    
*   $$w(A \\to B)$$: Weight of the attestation from $$A$$ to $$B$$, normalized relative to all other attestations to $$B$$.
    
*   $$\\alpha$$: A propagation factor to scale the penalty or reward, ensuring it doesn’t disproportionately affect attesters.
    

When the PageRank algorithm runs again, the updated personalization vector causes the desired update to the final credit scores $$C(A)$$ and $$C(B)$$.

**Example**

Suppose Bob is a borrower who defaults on his loan, leading to a reduction in his credit score $$\\Delta P(B) < 0$$ . Alice, one of Bob’s attesters, contributed a weight of $$0.3$$ to his total credit score. If the penalty factor is scaled by $$\\alpha = 0.5$$ , Alice’s personalization score $$P(A)$$ would decrease by:$$ \\Delta P(A) = 0.5 \\cdot \\Delta P(B) \\cdot 0.3 $$This propagation ensures that Alice shares some of the responsibility for endorsing Bob, discouraging careless attestations. The same equation works if, instead, Bob repays his loan. In this case, $$P(A)$$ and $$P(B)$$ update similarly, but in the positive direction.

The update to the personalization vector causes the corresponding outputs from PageRank, $$C(A)$$ and $$C(B)$$, to adjust accordingly.

### Incentivizing Attestations

By attesting to the creditworthiness of a borrower, the attester puts their credit score at risk. If the borrower defaults on the loan, the attester’s score lowers along with the borrower. For this reason, attesters need an additional incentive.

In addition to the interest and principal paid back to the lender, the repayment amount includes a small additional reward to be paid to all attesters. Each attester’s reward is proportional to their attestation weight:$$ \\text{Reward}_A = \\text{Total Reward} \\times \\frac{w(A \\to B)}{\\sum_{i \\in \\text{attesters}} w(i \\to B)} $$$

Cold Start
----------

Launching a decentralized microloan platform presents a cold start challenge, where the system initially lacks users, attestations, and established trust networks. To address this, sponsorship by a bank or a trusted financial institution is one way to bootstrap the system.

*   The bank can assign employees or designated representatives to serve as the first attesters. These individuals rely on traditional credit scoring tools to assess borrower reliability.
    
*   The bank can offer Know Your Customer (KYC) services for individuals or institutions who wish to become attesters in the system. Verified attesters are given higher initial reputation scores.
    
*   The bank can leverage its existing customer base and outreach channels to inform potential borrowers about the platform.
    
*   Finally, the bank can contribute initial liquidity to the system by seeding smart contracts with currency, ensuring that borrowers can access loans and lenders can begin earning returns immediately.
    

Other options to bootstrap the system might include direct funding and partnerships through, e.g., venture capital investors, or an AI agent with a bootstrapping objective.

### Parametrization

To effectively deploy this system, several parameters need to be set:

*   The loan amount and interest rate, most likely a function of the credit score.
    
*   The bonus reward payed by the lender to their attesters.
    
*   Any adjustment to the personalization vector $$P(i)$$ for participants who KYC or invest in the smart contract.
    
*   The backpropagation parameter $$\\alpha$$ used to update the attester’s personalization vector $$\\Delta P(A) = \\alpha \\cdot \\Delta P(B) \\cdot w(A \\to B)$$.
    

These can be set empirically or analytically, through financial models.

Conclusion
----------

This article provides a high-level architecture for a fully decentralized microlending platform based on community attestations and social capital. The system described can extend beyond traditional microlending platforms, reaching new populations, borrowers, and lenders.

---

*Originally published on [Scott Onchain](https://paragraph.com/@scottonchain/decentralized-onchain-microcredit)*
