Case Study: Hacken’s Audit of EBSI Smart Contracts
Hacken performed smart contract audits for the EBSI, contributing to the safety and reliability of digital public services across Europe
🇺🇦 Hacken stands with Ukraine!Learn more
The Peer-to-Pool lending is common among DeFi lending apps. How is Peer-to-Pool is different from a more popular Peer-to-Peer model for a user? We’ve partnered with one of our clients Zharta, a Peer-to-Pool lending protocol, to get the answers. We’ll get to see the architecture of Peer-to-Pool lending from Zharta’s first-hand account.
Zharta is an NFT-backed lending protocol. If you’re unfamiliar with the concept, it’s simple: you pledge your NFTs as collateral to get a loan.
Zharta has a Peer-to-Pool design allowing users to get a loan instantly. Its smart contracts make the protocol permissionless and, because the contracts themselves “store” the collateral in escrow, non-custodial and trustless.
In other words, since neither Zharta nor any of the parties involved in the loan get custody of the collateral for the duration of the loan, none of them need to trust each other –- they only need to trust the reliability of the smart contracts themselves. This is what makes third-party audits so crucial when it comes to this kind of protocol. Hacken has audited Zharta to ensure its Vyper smart contracts are secure and reliable.
P2P vs P2P (…wait, what?*)
As previously mentioned, Zharta uses a Peer-to-Pool system. Articles analyzing this ecosystem will usually split these protocols into either Peer-to-Peer or Peer-to-Pool as one of the first categories to take into account. Of course, the reality is more complex –- some protocols host pools that are owned by one user only, which makes their loans only technically Peer-to-Pool, while still others are experimenting with hybrid systems.
From a borrower’s standpoint, Peer-to-Pool protocols have the advantage of expediency, while Peer-to-Peer can allow for more tailored conditions (provided, of course, that you find a counterpart willing to meet them).
As for lenders, providing liquidity to a pool is a good way to earn a passive income with a “leave it and forget it” mentality, since loans are automated. Using Peer-to-Peer means more work and the risk of “losing” active time while you look or wait for a borrower. Peer-to-Peer, however, does allow lenders to look for “bespoke” conditions, and can be used with a “loan to own” strategy, wherein the lender looks for deals in which the borrower is likely to default so that the lender can get the collateral for a bargain price. While Peer-to-Pool protocols do allow lenders to buy defaulted collateral, lenders can’t be proactive when it comes to finding these deals or choosing the collection they want, and they also have to compete with other lenders by either bidding on the assets or getting to them first.
One of Zharta’s main selling points is its borrower liquidation protection.
In Peer-to-Peer, the platform can host the loans and leave their conditions to the two peers involved. That’s their whole point. If a borrower accidentally defaults, well, that’s the deal they chose to enter into, and the platform has no business meddling.
Peer-to-Pool protocols, however, require curation. If there’s a slew of defaults paired with an inability to sell the collateral, for example, that could result in a loss. To protect its lenders, the protocol needs to ensure that there are a number of controls in place to prevent such scenarios.
Automatic liquidations are one such control –- an attempt to prevent plunging collateral values to lead to a loss for the Pool. This mechanism means borrowers are exposed to market fluctuations which, in the NFT market, are not to be taken lightly.
Zharta does away with this mechanism entirely, resulting in Liquidation Protection for all loans. You choose a term for your loan, and you’ll only default if you fail to pay within that time period.
Zharta still protects its pool via other measures Peer-to-Pool protocols often rely on, such as thorough market research when choosing what collections to accept as collateral, well-balanced LTVs and APRs, and liquidity controls, among others.
Two other features you’ll find on Zharta’s platform are bundling and automatic collateral selection, which we’ve bundled under a single title due to how they complement each other. Bundling allows collectors of lower price-tier collections to still get a high-value single loan by pledging several NFTs at once, drastically improving gas efficiency. Automatic collateral selection should be particularly helpful in facilitating Bundling, since hand-picking dozens of NFTs for a large loan would probably get annoying fast.
Zharta offers pro-rata pricing, a pay-what-you-use mechanic. If you end up being able to repay your loan much earlier than the due date, you’ll save on the interest for all the days left in your term. This sort of mechanic allows you to choose a term that gives you a time buffer to make your repayment, for example, without worrying about having to pay for a bunch of potentially unnecessary days.
They also offer more in-depth customization options. You start by choosing between 3 loan-length tiers, each of which has distinct LTVs and APRs. Then, within each tier, you can further choose the specific number of days you want for your loan, as well as the amount you want to borrow.
Finally, Zharta’s platform is drastically visually distinct from its competitors. Its UI is colorful, cheery, and minimalistic. Whether this is an improvement relative to the competition is a matter of taste. Some people tend to prefer the more granular data displays you’ll find on other platforms, while others might appreciate a platform where all that info has been put away into tidy boxes and you only have to look at it if you want. Zharta’s clean UI does make for a more intuitive experience but, due to that lack of granularity, it also means you have to spend a bit more time looking into those details.
Much like a perpetually abandoned online shopping cart or a vacation you never ended up booking, you can test Zharta’s borrowing and lending flows without ultimately committing to anything.
For a more in-depth look see Zharta Documentation. It includes details veered for casual users, such as pricing and how it’s calculated, and more technical info, such as a comprehensive explanation of the architecture or asset valuation.