That time when we won four awards at a blockchain hackathon (and a grant) for developing a Parametric Digital Asset Risk Management dApp providing stablecoin lending protection using LINK, IPFS, TUSD, and AAVE

Project Context

Problem

Insurers find it extremely difficult to insure against Defi “Black Swan” events, and coverage options are nearly universally non-parametric. Users must work through a claims process to receive compensation for lost funds.

Solution

We built a decentralized protocol to offer protection against these events to encourage DeFi lending. A parametric risk management product, which would protect specific stablecoin assets (TUSD) using a combination of smart contracts and data feeds powered by Chainlink’s Proof-of-Reserve and Proof-of-Supply technology.

My Role

Product Designer
User Interface Designer

Project Type

Chainlink Hackathon

Project Breakdown

01

Problem

Decentralized finance is a rapidly expanding and highly volatile market; it has limited options for the availability of insurance coverage or risk management smart contracts.

Generally, insurers find it extremely difficult to insure against Defi “Black Swan” events, and coverage options are nearly universally non-parametric.

As a result of a lack of stablecoin insurance, many Defi users are exposed to nearly unlimited risk when interacting with Defi protocols, which is an extremely unappealing prospect both to Defi veterans and to people with no prior Defi experience.

Trillions of dollars are held in low-yield financial instruments like bonds, treasuries, and high-interest savings accounts. We wondered why this capital wasn’t moving to Defi lending protocols for improved yields, information clarity, and systemic guarantees.

Figure 1: Our team's online survey helped identify pain points for crypto users who want to lend their crypto but are afraid of losing everything.

02

Research Process

Diving into this further, we discovered people are concerned with losing their crypto due to hacks or other catastrophic events. According to a survey our team released on reddit, people want to lend their crypto and earn lucrative yields, but are afraid of:

  • Hacks to the platform, the smart contract, or liquidity reserves.
  • Failure of the underlying asset/token.
  • Business failures & the resulting long, drawn-out litigations.
Synthesize

To address some of these concerns, we decided to experiment with a potential parametric risk management product, which would protect specific stablecoin assets (TUSD) using a combination of smart contracts and data feeds powered by Chainlink’s Proof-of-Reserve and Proof-of-Supply technology.

Figure 2: With parametric insurance, a loss is triggered by a specific automated event, starting the smart contract's automatic execution on the blockchain.

03

Design

This risk management smart contract, as currently deployed, accepts a user request to engage with the smart contract, accepts user funds and the right to deposit them for the user, and transfers user funds to a Defi protocol, such as Aave, which are then stored in the appropriate liquidity pool.

The smart contract monitors TUSD’s Proof-of-Reserve and Proof-of-Supply data feeds. If the Proof-of-Reserve is greater than the Proof-of-Supply, this smart contract is valid; if the Proof-of-Reserve is less than the Proof-of-Supply by a difference of 5% or more, this contract becomes invalid, and it removes users’ funds from the Defi protocol (Aave) and returns them to the user. This is to protect the user from any cascading failures associated with the failure of the TUSD “stablecoin peg”.

The smart contract monitors the wallet reserves of the wallet that holds the user’s funds. For testing on Kovan, we used two different wallets: one is Aave’s TUSD testnet wallet; the other is a Mock Wallet that we have access to, and we can modify the contents of this wallet to demonstrate the smart contract’s ability to detect dramatic changes in the wallet’s contents which triggers a payout to the user from the smart contract’s “Smart Wallet”.

Finally, the smart contract gives the user the ability to withdraw their deposited funds and any interest, at any time, if they so choose. As compensation for this protection, the user currently is required to pay a percentage of their initially deposited funds to the smart contract. Ideally, the protocol would also periodically collect a portion of the interest-generated “aToken” from Aave as payment for automated DeFi protection.

04

Deliverable

We developed a smart contract that uses data to manage user risk when interacting with specific decentralized finance protocols.

The smart contract has end-to-end security, responds to changes in Chainlink-powered Proof-of-Reserve and Proof-of-Supply data feeds, responds to changes in the “locked liquidity” of simulated proxy wallets meant to represent commonly used Defi protocols, pays users in denominations they desire when the parametric conditions are met, and allows the user to withdraw their funds nearly instantly if they choose to do so.

Outcome

Our team won four awards from Aave, Chainlink, IPFS, and Armanino, and later earned IPFS’s Next Steps grant.

In essence, our smart contract provides improved risk management for stablecoins, information clarity, and symmetry, and helps facilitate improved yields compared to investing in traditional financial instruments.

In Retrospect...

  1. Insurance products for Defi are highly contextual and require extremely specific parameterization.
  2. Pricing models will be difficult to develop and necessitate the development of more robust sets of parameters for risk management systems.
  3. Increased complexity of parameterization is necessary to properly define the events which would trigger a payout, reduce the cost of coverage, and enable a widely adopted product.
  4. Finally, the liquidity reserves required for large-scale, mainnet-ready deployment would need to be substantial.
Figure 4: I created a detailed user journey map, and a site map and designed high-fidelity user interface wireframes on Figma to aid development.
Media credit goes to Lukas, Chainlink, and Mike Robinson.