TRUST LINES ON STACKS
Trust Lines on Stacks prevents hacks by preventing unauthorized transfers to accounts not on your wallet white list.
BACKGROUND
SIP-013 - Semi-fungible Tokens - was inspired by EIP-1155. What this tells us is that there are paradigms, features attributes and benefits that are useful from other chains to expand use cases with Stacks. Think of how Rome conquered Carthage by learning ship-building.
Why am I telling you this? Well, XRP, which is one of the key competitors for DEFI overall, leverages Trust Lines to empower the ENTIRE DEFI LANDSCAPE on XRP. You can see the spec here: Authorized Trust Lines
PROBLEM WORTH SOLVING / JOB-TO-BE-DONE
If there is a single barrier to onboarding new capital into Stacks, it’s hacks.
And that’s why we created this SIP: Trust Lines on Stacks.
The market on XRP has decided that Trust Lines are a core part of running a resilient DEFI Ecosystem. It stands to reason that the same market that enjoys XRP will like to configure their DEFI experience using the same paradigms they enjoy on XRP.
So…Trust Lines on Stacks. It’s the way we open the floodgates to value flowing into Stacks.
Demo
https://resilient-bombolone-da0704.netlify.app/
TL;DR
TRUST LINES ENSURE THAT ONLY PEOPLE YOU TRUST CAN TRANSACT WITH YOU BY ENABLING WALLETS TO WHITELIST TRUSTED ACCOUNTS.
Demo Links:
https://x.com/attractfund1ng/status/1883074256801800200
https://x.com/attractfund1ng/status/1885198910915743914
https://x.com/attractfund1ng/status/1884914063035060377
GET TO THE TECHNICAL POINT ALREADY
This SIP outlines a new Clarity library and corresponding functions for implementing Trust Lines on the Stacks blockchain. The Trust Lines mechanism would operate as a layer on top of existing token standards and would not require any consensus-breaking changes to the Stacks blockchain.
The proposed Trust Lines system will include the following features:
- Trust Line Establishment: Users can establish a Trust Line for a specific token with another user by specifying the token, the counterparty, and the credit limit.
- Token Transfers via Trust Lines: Transfers of tokens between accounts with established Trust Lines can occur without requiring immediate on-chain settlements. The system will maintain a balance ledger for each Trust Line, tracking credits and debits.
- Trust Line Modification: Users can modify the credit limit of an existing Trust Line, either increasing or decreasing it.
- Trust Line Closure: Users can close a Trust Line, settling any outstanding balances using on-chain token transfers.
The Clarity library will provide the following functions:
- establish-trust-line: Creates a new Trust Line between two accounts.
- transfer-via-trust-line: Executes a token transfer through an existing Trust Line.
- modify-trust-line: Changes the credit limit of a Trust Line.
- close-trust-line: Settles outstanding balances and closes a Trust Line.
FEATURES ATTRIBUTES AND BENEFITS FOR STACKS BY INTRODUCING TRUST LINES
- Increased Flexibility: Trust Lines provide a more granular and customizable approach to managing token relationships between users.