Clarity DeFi Vault SIP

Hello all,

I wanted to start a discussion thread about a new SIP idea proposed by @Tycho and others. I will be polishing up the SIP into our standard format, but wanted to preset the original idea and writeup here for the community to discuss feedback. Please let us know if there are particular questions or comments you would like to share about the idea.

Clarity DeFi Vault SIP

Introduction

Problem: As a result of Clarity’s design, it isn’t possible for borrowers to identify their collateral positions on the Stacks explorer.

  • If a user posts collateral on a Stacks DeFi app, and wants to look up their collateral vault on chain, they will see one large Clarity contract that holds all the collateral across an entire protocol (i.e. all collateral locked across the Arkadiko protocol).
    • This is a different experience from DeFi on any other chain, where the user can identify their collateral in a separate smart contract on the chain’s explorer.

As a result of Clarity’s design, the user might believe that their collateral funds are being commingled with other users’ collateral which results in a poor user experience.

As a user, one of the main value propositions for using DeFi over CeFi is to be able to look up collateral positions natively on chain. Today, this is possible on Ethereum but not on Stacks.

Technical background of the Problem

In Solidity, it is possible to deploy (instantiate new contracts) by executing Solidity code in transactions. This allows for the deployment of contracts that represent vaults holding ERC-20s to logically separate them. These collateral holding contracts can be easily looked up on Etherscan, allowing users to check up on the collateralisation of DeFi protocols.

In Clarity, by design, it is not possible to deploy new contracts while executing transactions. If it were possible to deploy contracts while executing a transaction, it would be impossible to determine finality (a contract could recursively deploy contracts in an undefined manner). For this reason, to be able to represent an entity that holds SIP-010s, it is necessary to implement the logic in a single contract address.

The Solution

Create a common interface for contracts that hold SIP-010 assets. Clarity does not allow contract deployment, so different entities have to be held in the same contract, but separated logically.

If this common interface is used by the Stacks explorer, users will see their collateral positions as separated from the other collateral in the DeFi protocol - resulting in the same user experience as DeFi on Ethereum/Solana/etc,

Github: https://github.com/FriendsFerdinand/sips/blob/vault-standard/sips/sip-vault/sip-vault.md

Backers

Tycho Onnasch and Fernando Foy: Core Contributors to Zest Protocol

Philip de Smedt: Core Contributor Arkadiko

Christian Hresko: Product Manager Stacks Explorer

4 Likes

Integrate for layer 2 also , wrap them in nfts such as BNS names for Identity all transaction will be there. Everyone get a bns name . We all winners! :slight_smile:

BNS COMMUNITY - The only true decentralised domain names for web3 future.