In the real-world, it is very difficult to securely share credentials - either they exist physically or are held in data siloes. The web needs a self-sovereign process for sharing credentials securely, for social networking, verification and access to dapps/apps - profile.io provides this. With DWNs, profile.io can cryptographically verify the authenticity of a record in a way that eliminates middle-men.
For our choice of application, we decided to demonstrate an on-chain banking system that utilises a credit score verifiable credential, held securely in DWNs, to issue unsecured loans - something that DeFi has yet to solve. We are binding a special relationship between the user's Ethereum address and their real-life credit score to enable this.
What it does
The profile.io user connects their smart contact and/or wallet account to the dBank decentralised application. From there, the user is prompted to request a credit score credential through a specialised "Credit Checker" DWN that (in a full version) interfaces with real-world APIs such as Equifax. While we are in the process of obtaining actual credit score apis from both Equifax and Experian, their slow process hindered this and demonstrated the potential for a user owned and decentralised credit scoring system.
In the demo, once the credit score is received, the user (Alice) can approach the Bank's DWN, who then verifies that her credit score record originated from the Credit Checker. Once verified, the Bank sets Alice's credit score in the Bank smart contract. She is then free to take out an unsecured loan.
How we built it
For the server-side application, we are making use of AWS EC2 to host the DWNs. We are making use of Cheqd SSI chain to issue and verify the credentials. In terms of the smart contract implementation, we deployed a Bank ERC20 contract to provide the loan issuance. Once the user (Alice) is verified, her credit score is automatically set in the smart contract via an API. We have also integrated WalletConnect to enable Smart Contract Accounts to interact with our E2E solution.
Challenges we ran into
- We tried to integrate Trinsic and Polygon ID, however we found that they remain difficult to use at the speed we were operating, given faster alternatives. We recommend improving their Developer Experience and will surely remain engaged with these ecosystems.
- Regarding the DWNs, we had to test with different versions due to errors arising from the latest releases, which resulted in bugs.
- For integrating the smart contract account, we ran into some minor bugs that couldn't be resolved relating to detecting transaction finalisation on the front-end.
- We also ran into CPU limitations when hosting multiple servers on AWS.
Accomplishments that we're proud of
- We are proud to functionally demonstrate the operation of issuing and verifying a credential, to then enable unsecured loans on-chain, as this is a novel issue that has plagued the space for some time. Although this is a demo app, we feel that we have laid the groundwork for how a decentralised credit system could work as a dapp within profile.io's wider decentralised identity platform which is under development.
What we learned
This process instilled in us the importance for decentralised systems to enable sovereignty over our data and how we manage it. We also learned the technical requirements for creating such a system and are impressed by the potential of DWNs, and so are equipped to add this to Profile.io.
What's next for Profile.io and Dbank
Profile.io's mission is to give users complete agency over how their data is shared and managed, and therefore we hope to integrate these solutions into profile.io's broader programmable web3 badging professional network. Please stay updated at profile.io