Whatlet
GENERAL INFO & LINKS
https://github.com/D9J9V/Whatllet
Related projects: ETH Global NYC | Optimizer Finance
General Description
Whatlet is a WhatsApp-integrated interface that enables users to interact with their crypto wallets through text messages. This interaction allows sending, receiving, and requesting P2P loans among friends, while also providing access to the counterparty’s credit score.
Problem to Solve: LatAm Digital Economy
First Principles
- Ease of use: It must be so easy to use that we onboard our grandmothers
- Verifiability: Any credit system must allow verification of a user’s solvency.
- Privacy: In an ideal world, verification should not compromise the individual’s privacy.
- Interoperability: The system should be compatible and easily usable by multiple DeFi protocols.
- Scalability: It must be efficient enough to handle a large number of users and transactions.
- Adaptability: Ability to update or change the scoring model as the DeFi ecosystem evolves.
Problem Decomposition
- Ease of use
- How can we build an app that works even if you don’t know Bitcoin or Ethereum?
- How do we give unbanked people access to the digital economy?
- Verifiability
- How can we ensure that the data used to evaluate credit is accurate and truthful?
- How do we guarantee that users cannot manipulate their score?
- Privacy
- How can we let users verify their solvency without revealing specific details about their transactions or assets?
- Interoperability
- How do we get different DeFi protocols to accept and integrate our credit scoring system?
- How do we make different DeFi protocols leverage pre-existing social relationships and integrate new users into the new financial system?
- Scalability
- How do we manage growth in users and interactions without compromising system performance or effectiveness?
- Adaptability
- How can we update the scoring model and associated metrics without disrupting the service or accuracy?
Possible Solutions from First Principles
- Ease of use: Use Account Abstraction to create Smart Accounts for users instead of dealing with Wallet Based accounts. Use gas abstraction to simplify the use of Web3 protocols under the assumption of Moore’s Law.
- Verifiability: Use machine learning algorithms to evaluate the history of interactions with DeFi protocols, and use zero-knowledge proofs to verify claims without revealing details.
- Privacy: Implement zero-knowledge proofs (ZK-proofs) that allow users to demonstrate attributes about their transactions or portfolios without revealing the underlying details.
- Interoperability: Develop an open and well-documented API that allows other DeFi protocols to interact with the credit scoring system easily and securely.
- Scalability: Use ZK-Rollups or other scaling layers to handle a large number of transactions and calculations efficiently.
- Adaptability: Design the system with the ability to upgrade through a decentralized governance mechanism, allowing changes to the scoring model and other key parameters.
By addressing each of these principles methodically, we can begin to form a robust solution for a decentralized credit scoring protocol.
Technology Stack
Technology Stack
To address the challenges mentioned above, we propose using the following technologies:
- Smart Contracts: We will use Solidity and EVM compatible chains to implement the smart contracts that will function as the core of our DeFi protocol.
- Machine Learning Algorithms: We will use machine learning libraries like TensorFlow or PyTorch to train models that can evaluate users’ creditworthiness based on their history of interactions with DeFi protocols. We will use LLMs to enable users to interact with natural language.
- Zero-Knowledge Proofs: We will implement zero-knowledge proof libraries like zk-SNARKs or zk-STARKs to allow users to demonstrate certain attributes about their transactions or assets without revealing confidential information.
- APIs and Interoperability Protocols: We will use standards like ERC-20 and ERC-721 to facilitate interoperability with other DeFi protocols. Additionally, we will develop an open and well-documented API that allows developers to easily integrate our credit scoring system into their applications and protocols.
- Scaling and Efficiency: We will consider implementing scaling solutions like ZK-Rollups or sidechains to handle a large number of transactions and calculations efficiently, minimizing costs and network congestion.
With this technology stack, we will be prepared to address the challenges posed and build a decentralized credit scoring protocol that is verifiable, private, interoperable, scalable, and adaptable in the DeFi ecosystem.
Protocol Design and Usage
Homomorphic Encryption
Homomorphic encryption is an indispensable requirement for the operation of ZK-circuits, as it allows performing operations on encrypted data without needing to decrypt it. This guarantees the privacy and security of user data throughout the entire creditworthiness verification process.
Vector Score
Principle of a vector score rather than a point score, since this way the lending protocol that uses our API can establish its requirements and weighting functions simply using a dot product defined according to the use case.
Credit Score Components
- Prosumer Auth via WorldID
- FICO (R) @ Score,
- CredScore Protocol,
- Wallet Balance,
- WorldID,
- “Debt capacity” (Can be represented with leverage level or Assets - Debts)
e.g. 1.
A P2P lending protocol establishes that to access the Liquidity Pool funds, only proof that the applicant is verified as human through WorldID is required. Let V \in N be the score vector corresponding to user 1, where V_1, V_2, …,V_N correspond to each of the verifiable attributes, where V_n corresponds to the indicator function of PoH via WorldID, where 0 = Not verified and 1 = Verified. V = (V_1, V_2, …, V_n, …, V_N).
Let R be the Requirements vector of protocol A, where R_1, R_2, …, R_N corresponds to each verifiable boolean requirement. Having only 1 requirement, the vector R = (R_1 = 0, R_2 = 0, …, R_n = 1, …, R_N = 0)
The proof consists of: P = R I - V = 0, where I is the identity matrix of dimension N and P is the zero vector of dimension N.
e.g. 2.
Another example of API usage would be in a lending protocol based on user credit history. In this case, the requirements vector R would contain information about the applicant’s credit history, such as previous credit scores, late payments, etc., while the score vector V would represent the current user’s credit history.
…
This would allow evaluating whether the user meets the solvency requirements established by the protocol.
TOOLING
AI & ML
-
LangChain: For user interfacing w/ natural language
-
PyTorch (Pending)
KYC
- WorldID: Proof of Personhood
- Decide to validate onchain or offchain
- FICO (R) Score: TradFi Credit Score
Off-chain Data Integrity
- Abstract (Simulate) this coming from a server, adding TLS Notary
Auth / Onboard
- Biconomy
- WalletConnect (Default by Scaffold ETH 2 by Buidl Guidl)
Privy: Link several wallets and social to 1 userNextID: Link several wallets and social
ZK
query for lending protocol events . ex: aave- lendingpool.sol 1. event borrow()
Front-end
- PWA Lens: https://github.com/dabit3/lens-pwa
- WhatsApp API
- https://github.com/scaffold-eth/scaffold-eth-2
On-chain query
GraphAPI | https://app.airstack.xyz/api-studio
EVM-compatible Chains
| CHAIN | World ID Router | SC DEPLOY |
|---|---|---|
| Base Goerli | 0x78ec127a3716d447f4575e9c834d452e397ee9e1 | 0xE3f974D6AC1F1052F00e02E71235A718629CE10a |
| Stylus | API | |
| Polygon Mumbai | mumbai.id.worldcoin.eth | 0x03C7523797c3fe25d214C571aA15a531079b14Ed |
| Gnosis | API | |
| Filecoin FEVM | API | |
| Scroll | API | 0xE3f974D6AC1F1052F00e02E71235A718629CE10a |
| Axiom | API | |
| Celo | API | |
| Linea | API | |
| Neon | API | 0xE3f974D6AC1F1052F00e02E71235A718629CE10a |
| Mantle | API | |
| XDC | API | |
| Optimism Goerli | ||
| Bounty? | op-goerli.id.worldcoin.eth | |
| Ethereum Goerli | ||
| Bounty? | goerli.id.worldcoin.eth |
IMPLEMENTATION
Addresses
Resources
https://docs.ens.domains/dapp-developer-guide/resolving-names
https://github.com/aave/aave-protocol/blob/master/contracts/lendingpool/LendingPool.sol