Inspiration
Most lending projects today in defi like Maker, Compound, Aave, etc are over-collateralized to ensure solvency. This defi-native paradigm is catering to more active traders who can obtain leverage by circling and providing 1.5x (say) collateral every time. This doesn’t solve the problem of lending to a bigger audience who can deploy this capital for other use cases. Most real-world loans are under-collateralized. But how do trust an anonymous user on your protocol and in their ability to pay back the loan? I got interested in this problem over ethNYC end of June and have been continuously researching the area and iterating the project.
What it does
As a borrower with a WorldID (from Worldcoin), you can request a loan from a pool. Any approver who has staked their assets in the pool can approve your loan based on the on-chain reputation. If you pay back your loan in time (say 30 days) with say 20% APR interest, your approver earns 75% of this interest and the rest 25% goes to the passive pool stakers. In case you fail to pay, your approver gets their stake slashed to pay back the pool. Since each person can only have one WorldID (proof of personhood built around scanning iris), delinquency means being blacklisted from the protocol forever. This verification can be provided without de-anonymizing the identity of the borrower. The most important part is the on-chain reputation score built on prior borrowing/lending history (utilization ratio, timeline, late payments, etc). Additionally, this reputation score is optionally (depending on the pool) personalized to them by the minimum distance between you too in Lens social graph (social lending). Or any form of credit information given by data providers which need to be active/passive stakers in the specified pool.
How we built it
For an MVP, we have one MediciPool to provide micro-loans based on on-chain reputation built on traditional credit metrics and social graph distance from Lens. We're using TheGraph for querying this data and using RiskManager.sol to update reputation. We've deployed the contracts on Polygon Mumbai since all the worldCoin contracts are already deployed there. The slashing mechanism is built using Chainlink keepers with checkDefault as an upkeep. Lastly, we're using Worldcoin for their proof of personhood protocol.
Challenges we ran into
I underestimated the scope of the project and the amount of research I needed to do to calculate reputation accurately. This part of the project is not finished yet. And the worldID contracts being so early, keep changing and I need to keep debugging on my side.
Accomplishments that we're proud of
I'm a developer so I'm proud of working on things that I normally don't do, like designing the UX, pitching to people, etc.
What we learned
On-chain reputation for retail customers has broader implications in the lending to avenues like Buy Now Pay Later, etc and this will be an ongoing area of research for me.
What's next for Medici Finance
More research and MVP launch before I go back to school in mid-September.
Built With
- graphql
- lens
- solidity
- worldid
Log in or sign up for Devpost to join the conversation.