The inspiration of the 'Lender' project is that for true DeFi everyone should have an easy way to become part of the financial decentralized system and gain benefits from it. Problem right now is that crypto has no way of doing a KYC process so there is no guarantee that borrowers will acts faithfully and pay the loans.

What it does

'Lender' aims to bridge the gap between institutional lending and DeFi by using a component called 'TrustedPartnetNetwork' to keep track of clients and member lenders behavior so that loans with less collateral can be given to those that have a history of paying loans faithfully. The essence is that lenders group together and trust each other that they will not try to create false clients that gain fidelity. The networks acts similar to a guild and based on the profit that clients generate inside the network, they will unlock higher fidelity levels and will be able to get loans with less collateral.

How we built it

'Lender' is the main component of this project. It combines together 3 additional components: 'LockedLoanCollateral', 'TrustedPartnerNetwork' and 'DepositContributors' into a powerful tool for lending that can be used by anyone without any KYC The design of this blueprint is in line with Scrypto 0.5 where dapps can be composed of multiple small components each with its own purpose, that are maintained and tested as separate projects. The lender component is acting as a liason between these three components by connecting them together and providing the wrapper api. for borrowers to interact with them.

Challenges we ran into

Eeven if Scrypto is safer than most dapp development language, designing the whole system so that it cannot be exploited is a challenge into itself because there are still mistakes that can be exploited and as a programmer you have to run every scenario in your head about what could go wrong. Also, creating a component that separates everything into its own sub-module so that it can be reused with a clean api and self-explanatory code is a time consuming process that can only be done through multiple iterations.

Accomplishments that we're proud of

Even if it sounds simple, thinking of a lending system that could function without a KYC process is a complex thing and once you get into implementing, it gets even harder. I'm proud that I managed to implement everything I set out even though I had no prior experience with rust or dapp development and in such a short time span (two weeks because I was on vacation part of the time).

What we learned

As a c++ developer - where you have great power over your code, rust became annoying at first because of all the restrictions and often times it made me restructure my code in order to comply (or use slower methods like clone). Once I understood the purpose of the errors and why it works that way, I have to say that I appreciate the language even more. The learning curve is a bit harder at first versus other languages until you grasp the inner workings of the compiler. I'm glad I tried implementing this blueprint as it gave me the opportunity to learn rust and understand why Scrypto is such a powerful tool.

What's next for Lender

Lender is separated into smaller components and each component needs to be thoroughly tested individually, as a separate project. There are still improvements to be done to the code as this is more like a prototype than a final implementation that is ready for release.

Built With

Share this project: