
Sybil Detection by XGBoost
Public blockchains are transparent, accurate, and comprehensive records of their entire history. These freely available data sets are some of the largest and cleanest in the world, and they are highly amenable to the application of machine learning. In 2024, the Ethereum blockchain has about 200 million addresses, which is the same as the count of active websites on the internet. It is a global, public, financial dataset of internet scale. Ranking, classification, personalization, co-occurren...

A Taxonomy of LayerZero Network Users Arising from Sybil Analysis
IntroductionA critical threat to the integrity of peer-to-peer networks, especially within blockchain ecosystems, is the Sybil attack. First identified by Douceur, this type of attack involves a single adversary creating multiple fake identities—known as Sybils—to undermine the network. These false identities can be leveraged to manipulate consensus mechanisms, disrupt the fair distribution of resources, or even execute double-spending attacks. Sybil attacks are prevalent across a variety of ...

Solidity Interface for Uncollateralized Onchain Microfinance
This is a technical specification for a smart contract interface, intended for implementation by a solidity engineer. For an overview of onchain microlending targeted to a more general reader, please see the article Decentralized Onchain Microcredit.FunctionsdepositFunds(uint256 amount)Allows lenders to deposit funds into the protocol. The amount is in USDC, scaaled to 6 decimals. For example, 1,000,000 corresponds to 1 USDC, and passing 5,000,000 corresponds to 5 USDC.previewLoanTermsThis fu...
Applied scientist studying algorithmic reputation and identity.

Sybil Detection by XGBoost
Public blockchains are transparent, accurate, and comprehensive records of their entire history. These freely available data sets are some of the largest and cleanest in the world, and they are highly amenable to the application of machine learning. In 2024, the Ethereum blockchain has about 200 million addresses, which is the same as the count of active websites on the internet. It is a global, public, financial dataset of internet scale. Ranking, classification, personalization, co-occurren...

A Taxonomy of LayerZero Network Users Arising from Sybil Analysis
IntroductionA critical threat to the integrity of peer-to-peer networks, especially within blockchain ecosystems, is the Sybil attack. First identified by Douceur, this type of attack involves a single adversary creating multiple fake identities—known as Sybils—to undermine the network. These false identities can be leveraged to manipulate consensus mechanisms, disrupt the fair distribution of resources, or even execute double-spending attacks. Sybil attacks are prevalent across a variety of ...

Solidity Interface for Uncollateralized Onchain Microfinance
This is a technical specification for a smart contract interface, intended for implementation by a solidity engineer. For an overview of onchain microlending targeted to a more general reader, please see the article Decentralized Onchain Microcredit.FunctionsdepositFunds(uint256 amount)Allows lenders to deposit funds into the protocol. The amount is in USDC, scaaled to 6 decimals. For example, 1,000,000 corresponds to 1 USDC, and passing 5,000,000 corresponds to 5 USDC.previewLoanTermsThis fu...
Applied scientist studying algorithmic reputation and identity.

Subscribe to Scott Onchain

Subscribe to Scott Onchain
Share Dialog
Share Dialog


<100 subscribers
<100 subscribers
(Cover image credit: World Bank Flickr, used under a Creative Commons License.)
The World Bank estimates that 1.4 billion people worldwide 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, an economist from Bangladesh. His efforts led to the creation of the Grameen Bank, 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 for their contributions to economic and social development.
Kiva, 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 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.
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).
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.
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) 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 representing the strength of the attestation, from to .
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.
Here:
runs over all nodes (addresses)
is a personalization vector that sums to one across nodes
is the credit score of node , initialized to and calculated iteratively
runs over nodes with edges to
is initialized to , then computed iteratively until the delta between subsequent iterations is within a threshold.
Cold Start: Initialization of the Personalization Vector
The personalization vector affects the output credit score , with higher values of correlated with higher values of . We initialize the vector uniformly at first, increment the score for any special situations, then normalize the vector so that it sums to .
Each participant begins with an equal base value (e.g., ).
Some participants may be preferred by the system, especially to bootstrap the system in the beginning. Such preferences are represented by incrementing . For example, the system may increment for addresses KYC’ed by a bank, or for addresses which are functioning as lenders.
After assigning base values and bonuses, the personalization vector is normalized so that the sum across all participants equals 1
$
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.
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.
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 and borrower , the attester’s update is:Where:
: Change in the attester’s personalization value.
: Change in the borrower’s personalization value (positive for repayment, negative for default).
: Weight of the attestation from to , normalized relative to all other attestations to .
When the PageRank algorithm runs again, the updated personalization vector causes the desired update to the final credit scores and .
Example
Suppose Bob is a borrower who defaults on his loan, leading to a reduction in his credit score . Alice, one of Bob’s attesters, contributed a weight of to his total credit score. If the penalty factor is scaled by , Alice’s personalization score would decrease by: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, and update similarly, but in the positive direction.
The update to the personalization vector causes the corresponding outputs from PageRank, and , to adjust accordingly.
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)} $$$
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.
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 for participants who KYC or invest in the smart contract.
The backpropagation parameter used to update the attester’s personalization vector .
These can be set empirically or analytically, through financial models.
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.
(Cover image credit: World Bank Flickr, used under a Creative Commons License.)
The World Bank estimates that 1.4 billion people worldwide 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, an economist from Bangladesh. His efforts led to the creation of the Grameen Bank, 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 for their contributions to economic and social development.
Kiva, 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 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.
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).
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.
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) 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 representing the strength of the attestation, from to .
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.
Here:
runs over all nodes (addresses)
is a personalization vector that sums to one across nodes
is the credit score of node , initialized to and calculated iteratively
runs over nodes with edges to
is initialized to , then computed iteratively until the delta between subsequent iterations is within a threshold.
Cold Start: Initialization of the Personalization Vector
The personalization vector affects the output credit score , with higher values of correlated with higher values of . We initialize the vector uniformly at first, increment the score for any special situations, then normalize the vector so that it sums to .
Each participant begins with an equal base value (e.g., ).
Some participants may be preferred by the system, especially to bootstrap the system in the beginning. Such preferences are represented by incrementing . For example, the system may increment for addresses KYC’ed by a bank, or for addresses which are functioning as lenders.
After assigning base values and bonuses, the personalization vector is normalized so that the sum across all participants equals 1
$
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.
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.
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 and borrower , the attester’s update is:Where:
: Change in the attester’s personalization value.
: Change in the borrower’s personalization value (positive for repayment, negative for default).
: Weight of the attestation from to , normalized relative to all other attestations to .
When the PageRank algorithm runs again, the updated personalization vector causes the desired update to the final credit scores and .
Example
Suppose Bob is a borrower who defaults on his loan, leading to a reduction in his credit score . Alice, one of Bob’s attesters, contributed a weight of to his total credit score. If the penalty factor is scaled by , Alice’s personalization score would decrease by: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, and update similarly, but in the positive direction.
The update to the personalization vector causes the corresponding outputs from PageRank, and , to adjust accordingly.
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)} $$$
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.
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 for participants who KYC or invest in the smart contract.
The backpropagation parameter used to update the attester’s personalization vector .
These can be set empirically or analytically, through financial models.
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.
runs over nodes with edges from (including )
is the damping factor, commonly set to 0.85
is the credit score of an inbound node
is the attestation weight of the edge from to .
The normalized vector serves as both the initial weighting and the personalization vector used within the iterative computation.
: A propagation factor to scale the penalty or reward, ensuring it doesn’t disproportionately affect attesters.
runs over nodes with edges from (including )
is the damping factor, commonly set to 0.85
is the credit score of an inbound node
is the attestation weight of the edge from to .
The normalized vector serves as both the initial weighting and the personalization vector used within the iterative computation.
: A propagation factor to scale the penalty or reward, ensuring it doesn’t disproportionately affect attesters.
No activity yet