Hero Background

Liquid Connect

Share:

What it is for

What problem does Liquid Connect solve?

Websites on Liquid need your money and your signature. A trading venue needs deposits, orders and withdrawals. A swap service needs a payout address that is really yours. Without a shared way to do this, every site builds its own login and its own way of asking a wallet to sign, and each one ends up holding something it should not hold, or asking you to paste addresses by hand.

Liquid Connect is one way for any site to reach your SideSwap wallet. You keep your keys. The site gets a watch-only view that you approved and can send you requests, such as sign in, fund this contract, sign this transaction or pay this. Your wallet shows every request in plain words and you decide there. Nothing on the site holds a secret and no site can move money by itself.

What are its three parts?

Connect. A site connects to your wallet through a relay, and you approve each request in the wallet.

Contracts. When a site locks your coins in a contract on Liquid, your wallet checks the contract, records it, and knows how you get out of it by yourself. A contract kind the wallet cannot verify is refused.

Identity. A connected wallet gets a Liquid Connect ID, and if you want one a handle, a verified email address and a phone number, so people can pay you without asking for an address. All of that is optional.

Connecting works on Liquid mainnet and on testnet. Contracts and identity are on testnet for now. The guide Connect your wallet to a website walks through a first connection.

What the server holds

What does the Connect server hold?

The Connect server is a relay. It carries a request from a site to your wallet and your answer back. It keeps a watch-only view of the wallet you connected, the list of sites you are connected to, the requests that are waiting for you, and what your wallet has told it about the contracts it holds.

It has no key. It cannot sign and it cannot spend. Your coins are on chain, in your wallet or in a contract, and the only thing that signs is the SideSwap app on your phone or computer, from a recovery phrase that never leaves it.

What can the server, or a site, never do?

Move your coins. Sign anything for you. See your recovery phrase. Approve a request for you. Reconnect a site you disconnected. Everything that moves value is a transaction your wallet built or checked and you approved.

What a site can do with the watch-only view is see the balances and history of the wallet you connected, for as long as the connection lasts. The wallet tells you this before you approve, and you can end it at any time under Connected websites. See Manage connected websites.

If the relay is down or gone

What happens if the Connect server is down?

Sites cannot reach wallets, so nobody can sign in through Liquid Connect or receive a new request until it is back. Nothing already on chain moves and nothing is lost. Your wallet still shows every contract it holds, because that record lives in the wallet and not on the server.

An outage is an inconvenience, not a loss.

What if Liquid Connect stopped for good?

You would keep everything. Your wallet is yours and works without it. Every contract a Liquid Connect wallet signs into has to be one you can leave by yourself, with your own key, from a fixed point at the latest, with no signature from the site or from SideSwap. That is the rule a contract has to pass before the wallet will sign it.

The record of your contracts is in your wallet. It is also written into the funding transaction as an encrypted note that only your recovery phrase can read, and it can be exported to a file. A wallet restored from its recovery phrase finds its positions again from the chain alone.

Who runs the relay?

SideSwap runs the relay servers, for mainnet and for testnet. A relay holds no key, so nothing about your coins depends on who runs it or on whether it is running.

Where is the contract itself stored, if not on chain?

In three layers, and only the first two matter for getting out. The program, which is the rules of a kind of contract, is the same for every contract of that kind. It is published, and your wallet carries it and checks the chain against it. So the chain proves which program holds your coins, and your wallet knows how to run it. The terms of a contract you funded ride in the funding transaction itself, in a short note that only your recovery phrase can read. Everything the exit needs is therefore in your recovery phrase plus the chain.

The rest is convenience, such as an offer's price list, labels, and which site a contract came from. The wallet keeps it, exports it to a file, and the site registers it again when you connect. Losing it costs you a lookup, not your money.

Why not a browser extension

Would a browser extension wallet be more independent?

It would depend on different things. An extension keeps your keys in a browser profile, so a wiped machine or a lost laptop is the failure case, and it still needs a node or an indexer for chain data and to broadcast. It does not work on a phone, where most people keep their wallet. And the data it saves on disk is the one copy of what you hold.

Liquid Connect keeps the keys in the SideSwap app, on a phone or a desktop, and uses a relay so that a website can reach that app with one button, the same way on every site. The price is that the relay has to be up for new actions. The gain is that your keys are in the best protected place you own, and nothing about your coins depends on the relay staying alive.

Getting your coins back

A site I used is gone. How do I get my coins out of its contract?

Every contract the wallet accepts has a branch that only you can spend, with your own key and your own fee. For a Swaption lending position that is the buyback, at any time before expiry. For a lend offer it is the withdrawal of the offer, at any time. For money owed to you as a lender it is the claim, with your lender token. The contract works out what the other side gets and fixes where it goes, so it does not matter who builds the transaction.

The wallet builds the exit itself. Buy back, Collect and Withdraw offer are buttons on the contract in your wallet, and the wallet signs and sends the transaction without asking the site. Contracts are on testnet for now.

What is the cutoff of a contract?

Every contract carries one point in time, fixed when it is created. Before it, the service takes only what the deal gives it through the contract's own rules, such as a lender's buyback price, and never at its own discretion. From it, your exit is open without conditions, and nobody can gain from finishing the contract against you.

What if a site asks me to sign a contract that does not pass?

The wallet refuses a contract kind it cannot verify, and does not show it as something it is not. A request the wallet cannot read as a contract is shown as what it is, a transfer to addresses.

Your wallet's record

What does my wallet record, and how does it survive a restore?

Every contract you sign into, with its kind, its terms, your role, the coin on chain, its state and its history. The wallet checks each one against the chain by itself and tells you what it found.

Three things carry the record across a lost phone. The record itself. An encrypted note in every funding transaction your wallet pays for, readable only from your recovery phrase, so a restored wallet rebuilds its positions from the chain. And an export you can save as a file and import into a fresh wallet. A site you connect to again also tells the wallet what it has on record, and the wallet keeps what the chain confirms.

Can a site write into my wallet without asking?

No. When you connect, the card says that the site may record positions it creates for you in this wallet, and that your wallet checks each one against the chain. Accepting the connection is the consent, and there is a switch under Connected websites that you can turn off at any time.

Availability

How do you keep the relay up?

The relays run as supervised services that restart by themselves. When a relay cannot be reached, a site says so and does not pretend, and your wallet keeps working for everything that does not need a site.

What an outage cannot do is touch your coins or your record. What it can do is delay a new sign in or a new request until the relay is back.

Is this live on mainnet?

Connecting a wallet to a site works on Liquid mainnet and on testnet. Identity, payment requests and the contract record are on testnet for now. A wallet on the wrong network is told so in the app, and the site shows why the login failed.

Privacy and identity

What does a connected site see about me?

A watch-only view of the wallet you connected. It shows the site, and the relay, the past and future activity of that wallet for as long as the connection lasts. The wallet says this on the card before you approve. Only connect to sites you trust with that, and disconnect when you are done.

Do I have to give an email address or a phone number?

No. Your Liquid Connect ID works by itself, and anyone you share it with can pay you. A handle, an email address or a phone number are there so that people who already have your contact details can find you, and only if you turn discovery on. The address or number itself is never stored, only a keyed hash. Nobody can look you up unless you let them.

Identity is on testnet for now. What is collected, and for how long, is in the privacy policy.

Still have a question?

Write to [email protected] and we will answer it here for the next person.