# What is Liquid Finance?

### Introduction

Liquid Finance is a non-custodial liquid staking protocol focused on unlocking liquidity within the Archway ecosystem. By participating in Liquid Finance, users can seamlessly balance between securing the Archway blockchain through staking and participating in applications within the broader ecosystem, such as decentralized finance (DeFi).&#x20;

By using Liquid Finance, users don't need to calculate the typical tradeoff between staking and liquidity as the protocol allows both to occur through its [liquid staking token sARCH](#sarch-token).

Liquid Finance smart contracts are deployed natively on the Archway blockchain, reducing security assumptions and further aligning the protocol with the Archway community.

### Core Features

#### sARCH Token

The sARCH token is a representation of balances staked within the Liquid Finance protocol. sARCH allows holders to earn interest from their staked assets while remaining liquid, allowing for increased capital efficiency of ARCH.

When users deposit their ARCH tokens into Liquid Finance, they can mint sARCH tokens in return. sARCH is an auto-compounding, reward-bearing token, meaning that staking rewards are automatically claimed and restaked by the protocol to compound the holder's yield.

For more information on the sARCH token, please see: ["Protocol Features -> sARCH"](#sarch-token)

#### Staking

When a user deposits their ARCH tokens into Liquid Finance, the protocol mints and sends sARCH tokens to the user's wallet based on the protocol's exchange rate. The deposited ARCH tokens are staked by the protocol and delegated to a whitelist of Validators to start accruing staking rewards.

For more information on staking, please see: ["Protocol Features -> Staking"](#staking)

#### Unstaking

Users have two options when they want to redeem their sARCH tokens for their original ARCH deposit plus accrued rewards:

1. Traditional Unstaking: There is a maximum unstaking period of 25 days before users receive their funds. The period may be shorter since new deposits and claimed rewards within the protocol are first used to match traditional unstaking requests.
2. Instant Unstaking: Users can instantly swap their sARCH tokens to ARCH for a small 1% fee. This swap is made possible through the Instant Unstaking Queue, which provides liquidity for the instant swaps. Instant Unstaking is dependent on enough liquidity being present in the Instant Unstaking Queue to fulfill the request.

For more information on unstaking, please see: ["Protocol Features -> Unstaking"](#unstaking)

#### Providing Liquidity

Liquidity providers have the opportunity to provide ARCH liquidity to the Instant Unstaking Queue and earn ARCH rewards for doing so. The queue operates on a First-In-First-Out (FIFO) basis, where the first liquidity provider to provide liquidity is the first to have sARCH tokens swapped against it. Liquidity providers receive 50% of the swap fees charged and are incentivized with ARCH while waiting in the queue.

Liquid Finance also offers a passive liquidity management option for liquidity providers want to participate in the queue called "Compound". Liquidity providers first provide their ARCH liquidity with this feature turned on, then once their ARCH is swapped to sARCH it automatically starts the unstaking process. Once claimable it gets provided back to the queue by the protocol without any manual intervention from the liquidity provider.

For more information on providing liquidity, please see: ["Protocol Features -> Providing Liquidity"](#providing-liquidity)

### Advantages

Liquid Finance being deployed natively on the Archway blockchain provides several advantages to users and the ecosystem:

* Ecosystem Composability: Building directly on top of Archway allows for synchronous composability between other Archway applications and Liquid Finance
* Minimized External Dependencies: Liquid Finance leverages the existing infrastructure and security of the Archway blockchain, reducing both the economical and technical dependencies of the protocol
* Flexible Incentives: Liquid Finance's has the flexibility to tailor protocol incentives to initiatives that increase the depth of liquidity and utility of sARCH&#x20;
* Sustainable Incentives: Combining Liquid Finance protocol incentives and Archway's value capture engine allows for Liquid Finance to increase the amount of rewards that are reinvested back into the ecosystem
* Diversified Validator Delegation: Liquid Finance delegates the ARCH deposited into the protocol across a range of highly-reputable and technically-competent Validators, reducing the slashing risk to a user's staked deposits
* Compounded Staking Rewards: Liquid Finance claims users' staking rewards and automatically re-stakes them within the protocol, compounding user's rewards without and manual intervention needed and saving the transaction fees required to do so
* Archway Community Focused: The Liquid Finance team works closely with Archway ecosystem participants to cater to the specific needs of the Archway ecosystem and ARCH holders


# Protocol Features

Learn about the following in this section:

* [Liquid Finance's Liquid Staking Token (LST) $sARCH](/protocol-features/sarch)
* [Staking Feature](/protocol-features/staking)
* [Unstaking Feature](/protocol-features/unstaking)
* [Liquidity Providing Feature](/protocol-features/providing-liquidity)


# sARCH

A user can deposit ARCH tokens into the Liquid Finance protocol to receive sARCH tokens in return. sARCH tokens are a representation of balances staked within the protocol.

sARCH is a fungible, reward-bearing token which means that by simply holding sARCH tokens you'll earn interest. This interest earned isn't distributed directly to the holder but rather is represented through the sARCH exchange rate.

The exchange rate increases in value over time relative to the underlying asset because it represents a share of the total amount of staked ARCH within the protocol. This total amount will continue to increase when staking rewards are claimed and staked again, which means users will be able to redeem more assets over time as interest is earned. Each sARCH token becomes convertible into an increasing amount of ARCH, even while the number of sARCH tokens in your wallet stays the same.

Holders of sARCH benefit in multiple ways, but mainly:

* Earning interest through the sARCH exchange rate which increase in value relative to ARCH over time
* Gives to ability to use sARCH as collateral throughout the Archway ecosystem and broader Cosmos


# Staking

The first feature of the Liquid Finance protocol is Staking.

On the app, the user should navigate to the "Stake" tab. This is where users will deposit the ARCH tokens to receive [sARCH](/protocol-features/sarch) tokens in return.

The amount of sARCH tokens received are based on the current sARCH exchange rate which will be displayed in the confirmation message before submitting the transaction.&#x20;

When a user deposits their ARCH tokens, Liquid Finance will stake them on the Archway Network and will delegate them across the protocols Validator set.

Liquid Finance automatically compounds staking rewards for the user by claiming available rewards and then re-staking them back within the protocol.

This allows holders of sARCH to passively benefit from the compounding of Archway staking rewards without having to perform any other transactions manually.

The projected staking APY is displayed on the app as well, calculated by taking the current Archway staking rewards and projecting a daily compound.

<figure><img src="/files/OtzprNwux4c1fWNzVt4U" alt=""><figcaption></figcaption></figure>


# Unstaking

The second feature of the Liquid Finance protocol is Unstaking.

On the app, the user should navigate to the "Unstake" tab. This is where users will redeem their [sARCH](/protocol-features/sarch) tokens for the underlying share of ARCH tokens they represent.

Within the Unstake feature, users will have two options to choose from:

#### Instant Unstake

When choosing this option users will be able to **instantly** unstake their sARCH tokens, automatically redeeming them for their share of the underlying ARCH tokens they represent.

For access to this liquidity privilege users will be charged a 1% instant unstaking fee which is applied to the exchange rate.

Instant unstaking is only available to users based on how much liquidity is present in the Liquid Finance Instant Unstaking Queue. The app will display how much liquidity is present in the queue at any given time.

This means that while enough liquidity is present to properly redeem the necessary ARCH tokens when taking to account the current exchange rate and instant unstaking fee, the transaction will be successful.

However, if there is not enough liquidity present the transaction will fail and users will need to either choose to continue holding sARCH, using the Delayed Unstake feature or perform a swap via a 3rd party dApp.

#### Delayed Unstake

When choosing this option users will undergo the traditional unstaking process of the Archway Network, which means the protocol will undelegate the proper amount of ARCH tokens and then will submit and unstaking request for those tokens.

The traditional unstaking period for ARCH tokens on the Archway Network is typically \~21-24 days. However, unique to Liquid Finance is that 25 days is the **maximum** amount of time that will be required to unstake you sARCH tokens.

Typically our delayed unstaking period will be much faster than traditional unstaking requests because protocol first matches both new ARCH deposits as well as claimed ARCH staking rewards with delayed unstaking requests before staking them within the protocol.

We plan to work with 3rd party monitoring/alerting services in the future to help notify users of the delayed unstake feature when their ARCH tokens are available to be claimed on the platform.

<figure><img src="/files/BLx1ZONLpkC07lqlXrhc" alt=""><figcaption></figcaption></figure>


# Providing Liquidity

The third feature of the Liquid Finance protocol is Providing Liquidity.

On the app, the user should navigate to the "Queue" tab. This is where users can supply their ARCH tokens to earn liquidity providing incentives as well as a portion of the instant unstaking fee.

#### Instant Unstaking Queue

ARCH tokens supplied through this feature are deposited into the Liquid Finance Instant Unstaking Queue.

The Instant Unstaking Queue works as a first-in-first-out (FIFO) queue system where the first user to provide liquidity to the queue will be the first person to have their ARCH swapped for sARCH when someone performs an instant unstaking operation.

When an instant unstaking request is received, as long as enough liquidity is present the queue system fills the order, swapping the liquid ARCH tokens for sARCH tokens. More than one user in the queue could be swapped against.

While providing liquidity to the Instant Unstaking Queue, LPs will receive ARCH token incentives provided by the Liquid Finance protocol as well as 50% of the instant unstaking fee (0.50% of the unstaked amount).

\----

When choosing to Provide Liquidity, users will have two options to choose from:

#### Active Liquidity Management

Users can withdraw their liquidity at any time in the "Liquidity details" section and can claim their ARCH incentives and/or the sARCH they received after a swap in the "Rewards" section.

#### Passive Liquidity Management (coming soon)

Users have the ability to "opt-in" to our passive management feature for liquidity providers by turning on the "Compound" button before depositing their liquidity.

This feature allows users to provide liquidity passively while compounding their LP rewards.

The way this works is when a user's ARCH liquidity is swapped against during an instant unstaking request, the protocol automatically requests to undergo the delayed unstaking process for those sARCH tokens. Once the unstaked ARCH tokens are available to claim the protocol will claim them and re-stake them within the queue along with the ARCH incentives and instant unstaking fee earned from being a liquidity provider within the queue.

Users can withdraw their liquidity in the "Liquidity details" section. Unlike the active liquidity management option users may need to wait in a Withdraw Queue to receive their entire liquidity position. This is because a portion of the user's liquidity may be undergoing the delayed unstaking process that was automatically triggered by the protocol when they were swapped against.

Users can still request to withdraw their full amount of liquidity but if any of their liquidity is still undergoing delayed unstaking they will see the amount they have in the withdraw queue in the "Withdraw details" section.

When a user requests to withdraw their liquidity they will find their claimable amount under "Claim details".

<figure><img src="/files/MJEZ81w1NNCK2l2Of1SK" alt=""><figcaption></figcaption></figure>


# Economics

Learn about the following in this section:

* [Liquid Finance's Fee and Incentive structure](/economics/fees-+-incentives)


# Fees + Incentives

Currently the incentive structure of Liquid Finance is as follows:

* 10% staking rewards commission
  * 7.5% to the Instant Unstaking Queue liquidity providers
  * 2.5% to Core Contributors
* 1% Instant Unstaking Fee
  * 0.5% to Liquidity Provider
  * 0.5% to Core Contributors
* Archway protocol rewards
  * Archway Inflation
    * 100% to the Instant Unstaking Queue liquidity providers
  * Gas Rebates
    * 100% to the Instant Unstaking Queue liquidity providers


# User Guide

Learn about the following in this section:

* [How to stake your ARCH tokens in Liquid Finance](/user-guide/staking-your-arch-tokens)
* [How to instantly unstake your sARCH tokens in Liquid Finance](/user-guide/instant-unstaking-your-sarch-tokens)
* [How to traditionally unstake your sARCH tokens in Liquid Finance](/user-guide/traditionally-unstake-your-sarch-tokens)
* [How to claim your unstaked ARCH tokens in Liquid Finance](/user-guide/claiming-your-unstaked-arch)
* [How to provide liquidity to the Liquid Finance Instant Unstaking Queue](/user-guide/providing-liquidity-to-the-instant-unstaking-queue)
* [How to claim your LP rewards](/user-guide/claiming-your-lp-rewards)


# Staking your ARCH tokens

Navigate to the Liquid Finance application. Ensure the "Stake" tab is being utilized

<figure><img src="/files/kHnNYUk7Za3zhOdzCXP0" alt=""><figcaption></figcaption></figure>

Click on "Connect Wallet" in the top right

<figure><img src="/files/1RSZLt3cnsmidFFsPGyK" alt=""><figcaption></figcaption></figure>

Click on "Archway Wallet" to connect your wallet to the platform

<figure><img src="/files/NwZ6METiUNYl9Ec2c8DX" alt=""><figcaption></figcaption></figure>

Once your wallet is connected, **you must have ARCH tokens to proceed.**&#x20;

Start by inputing the amount of ARCH tokens you would like to deposit into the platform. Please ensure that you are allowing yourself enough ARCH buffer to pay for network transaction fees

* Users also have the option when clicking on the text field to choose between 25%/50%/75%/100% of their token balance to deposit
* When users click on the ARCH "balance" they are inputting their entire ARCH balance

<figure><img src="/files/nMsI4KIix6jK5CT2Mj55" alt=""><figcaption></figcaption></figure>

Once satisfied with your input amount click "Stake"

<figure><img src="/files/uABwNB6BwUYwi7NJsF3J" alt=""><figcaption></figcaption></figure>

Ensure all the information in the confirmation message is correct and then click "Stake" again

<figure><img src="/files/df5AZhea1Nnzg2BoK0dD" alt=""><figcaption></figcaption></figure>

It's recommended (if using Keplr) to click on Transaction Fee -> Low to ensure you are paying a lower transaction fee. Once satisfied with the wallet confirmation, click "Approve" to submit the transaction

<figure><img src="/files/SP8s62wZtg2GOd05CWkR" alt=""><figcaption></figcaption></figure>

Now you're done! If your transaction was submitted to the network successfully you have now deposited ARCH into the Liquid Finance protocol and minted your sARCH redemption tokens 🚀


# Instant unstaking your sARCH tokens

Navigate to the Liquid Finance application. Ensure the "Unstake" tab is being utilized

<figure><img src="/files/3DDbByTxn6mdjMzglzwk" alt=""><figcaption></figcaption></figure>

Click on "Connect Wallet" in the top right

<figure><img src="/files/1LJFJ6K80LlHTvlK6pP7" alt=""><figcaption></figcaption></figure>

Click on "Archway Wallet" to connect your wallet to the platform

<figure><img src="/files/U7xXFoO8chglXijbXRHD" alt=""><figcaption></figcaption></figure>

Once your wallet is connected, **you must have sARCH tokens to proceed.**&#x20;

First, ensure the "Instant Unstake" option is selected

<figure><img src="/files/jmLKrtmPf00jgnwB56ql" alt=""><figcaption></figcaption></figure>

Then input the amount of sARCH tokens you would like to turn in to redeem for ARCH from the platform

* Users also have the option when clicking on the text field to choose between 25%/50%/75%/100% of their token balance to turn in
* When users click on the sARCH "balance" they are inputting their entire sARCH balance

<figure><img src="/files/mfhQcPY0kYFQQIzaT7Vm" alt=""><figcaption></figcaption></figure>

Once satisfied with your input amount click "Unstake"

<figure><img src="/files/KtyUl1DdL6V1ySW36NBc" alt=""><figcaption></figcaption></figure>

Ensure all the information in the confirmation message is correct and then click "Unstake" again

* Note: using the Instant Unstaking option incurs a 1% fee

<figure><img src="/files/MQrMD1aY4z2aeMM5rzw6" alt=""><figcaption></figcaption></figure>

It's recommended (if using Keplr) to click on Transaction Fee -> Low to ensure you are paying a lower transaction fee. Once satisfied with the wallet confirmation, click "Approve" to submit the transaction

<figure><img src="/files/YTjZKRrwZxmwNf8EsPjQ" alt=""><figcaption></figcaption></figure>

Now you're done! If your transaction was submitted to the network successfully and enough liquidity was available your sARCH tokens will have been swapped for ARCH tokens and should now be in your wallet 🚀


# Traditionally unstake your sARCH tokens

Navigate to the Liquid Finance application. Ensure the "Unstake" tab is being utilized

<figure><img src="/files/3DDbByTxn6mdjMzglzwk" alt=""><figcaption></figcaption></figure>

Click on "Connect Wallet" in the top right

<figure><img src="/files/1LJFJ6K80LlHTvlK6pP7" alt=""><figcaption></figcaption></figure>

Click on "Archway Wallet" to connect your wallet to the platform

<figure><img src="/files/U7xXFoO8chglXijbXRHD" alt=""><figcaption></figcaption></figure>

Once your wallet is connected, **you must have sARCH tokens to proceed.**&#x20;

First, ensure the "Traditional Unstake" option on the right is selected

<figure><img src="/files/jozZmb5msVQ7I2Xvaj9U" alt=""><figcaption></figcaption></figure>

Then input the amount of sARCH tokens you would like to turn in to redeem for ARCH from the platform

* Users also have the option when clicking on the text field to choose between 25%/50%/75%/100% of their token balance to turn in
* When users click on the sARCH "balance" they are inputting their entire sARCH balance

<figure><img src="/files/E1K4Z9otUYqjxN0CFT1P" alt=""><figcaption></figcaption></figure>

Once satisfied with your input amount click "Unstake"

<figure><img src="/files/YdUCgtkOI7fRt9L9OHsz" alt=""><figcaption></figcaption></figure>

Ensure all the information in the confirmation message is correct and then click "Unstake" again

* Note: using the Traditional Unstaking option incurs no fee

<figure><img src="/files/8wFRCGFKHPjQJ5XFBRWj" alt=""><figcaption></figcaption></figure>

It's recommended (if using Keplr) to click on Transaction Fee -> Low to ensure you are paying a lower transaction fee. Once satisfied with the wallet confirmation, click "Approve" to submit the transaction

<figure><img src="/files/OQd587N6adtDEEtx8ZOq" alt=""><figcaption></figcaption></figure>

Now you're done! If your transaction was submitted to the network successfully you will be able to see your traditional unstaking request at the bottom of the interface 🚀

<figure><img src="/files/deBmtNvRxTR897ZG3LZr" alt=""><figcaption></figcaption></figure>


# Claiming your unstaked ARCH

Navigate to the Liquid Finance application. Ensure the "Unstake" tab is being utilized

<figure><img src="/files/3DDbByTxn6mdjMzglzwk" alt=""><figcaption></figcaption></figure>

Click on "Connect Wallet" in the top right

<figure><img src="/files/1LJFJ6K80LlHTvlK6pP7" alt=""><figcaption></figcaption></figure>

Click on "Archway Wallet" to connect your wallet to the platform

<figure><img src="/files/U7xXFoO8chglXijbXRHD" alt=""><figcaption></figcaption></figure>

If your interface looks like this, your ARCH tokens aren't ready to be claimed yet and you will have to wait longer.

<figure><img src="/files/deBmtNvRxTR897ZG3LZr" alt=""><figcaption></figcaption></figure>

If your interface looks like this, your ARCH tokens are unstaked and ready to be claimed. Click "Claim"

<figure><img src="/files/wrIC2e4VxMr166g6doSR" alt=""><figcaption></figcaption></figure>

Ensure the confirmation message looks correct and then click "Claim" again

<figure><img src="/files/ObTrSIbp2b6bZMWrUaKD" alt=""><figcaption></figcaption></figure>

It's recommended (if using Keplr) to click on Transaction Fee -> Low to ensure you are paying a lower transaction fee. Once satisfied with the wallet confirmation, click "Approve" to submit the transaction

<figure><img src="/files/kvlARU8iqr9MyRy9e99W" alt=""><figcaption></figcaption></figure>

Congrats! If your transaction was sent successfully to the Archway blockchain you have now claimed your unstaked ARCH tokens and they should be in your wallet 🚀


# Providing liquidity to the Instant Unstaking Queue

Navigate to the Liquid Finance application. Ensure the "Queue" tab is being utilized

<figure><img src="/files/RSXzQp6XXBHt3wyLoMFH" alt=""><figcaption></figcaption></figure>

Click on "Connect Wallet" in the top right

<figure><img src="/files/TLLsDIJVXw6TQFLdRT6s" alt=""><figcaption></figcaption></figure>

Click on "Archway Wallet" to connect your wallet to the platform

<figure><img src="/files/MBD3sz8gu07ozHEnerFx" alt=""><figcaption></figcaption></figure>

Once your wallet is connected, **you must have ARCH tokens to proceed.**&#x20;

Start by inputing the amount of ARCH tokens you would like to provide as liquidity to the Instant Unstaking Queue. Please ensure that you are allowing yourself enough ARCH buffer to pay for network transaction fees

* Users also have the option when clicking on the text field to choose between 25%/50%/75%/100% of their token balance to deposit
* When users click on the ARCH "balance" they are inputting their entire ARCH balance
* **Note: you must provide a minimum of 10 ARCH liquidity**

<figure><img src="/files/g2aKiw7THkhCmN1mbZJ9" alt=""><figcaption></figcaption></figure>

Once satisfied with your input amount click "Add Liquidity"

<figure><img src="/files/cDM85t0nQQSEs2qSjTyz" alt=""><figcaption></figcaption></figure>

Ensure all the information in the confirmation message is correct and then click "Confirm"

<figure><img src="/files/YMwFwwYT7vHobIsKPdQC" alt=""><figcaption></figcaption></figure>

It's recommended (if using Keplr) to click on Transaction Fee -> Low to ensure you are paying a lower transaction fee. Once satisfied with the wallet confirmation, click "Approve" to submit the transaction

<figure><img src="/files/SZFH4OX8gGliNYceyXx2" alt=""><figcaption></figcaption></figure>

Now you're done! If your transaction was submitted to the network successfully you have now provided ARCH liquidity into the Liquid Finance Instant Unstaking Queue 🚀


# Withdrawing your Instant Unstaking Queue Liquidity

Navigate to the Liquid Finance application. Ensure the "Queue" tab is being utilized

<figure><img src="/files/RSXzQp6XXBHt3wyLoMFH" alt=""><figcaption></figcaption></figure>

Click on "Connect Wallet" in the top right

<figure><img src="/files/TLLsDIJVXw6TQFLdRT6s" alt=""><figcaption></figcaption></figure>

Click on "Archway Wallet" to connect your wallet to the platform

<figure><img src="/files/MBD3sz8gu07ozHEnerFx" alt=""><figcaption></figcaption></figure>

Once your wallet is connected, **you must have ARCH liquidity provided to proceed.**&#x20;

Click the "Withdraw" button

<figure><img src="/files/yiVoPotJKbqaIys7M2yz" alt=""><figcaption></figcaption></figure>

Ensure all the information in the confirmation message is correct and then click "Withdraw"

<figure><img src="/files/zbv1ZGMPbUWy2Gm9VptA" alt=""><figcaption></figcaption></figure>

It's recommended (if using Keplr) to click on Transaction Fee -> Low to ensure you are paying a lower transaction fee. Once satisfied with the wallet confirmation, click "Approve" to submit the transaction

<figure><img src="/files/M9zAMoezrNt8WYL8lVTO" alt=""><figcaption></figcaption></figure>

Now you're done! If your transaction was submitted to the network successfully you have now withdrawn your ARCH liquidity from the Liquid Finance Instant Unstaking Queue 🚀


# Claiming your LP rewards

Navigate to the Liquid Finance application. Ensure the "Queue" tab is being utilized

<figure><img src="/files/RSXzQp6XXBHt3wyLoMFH" alt=""><figcaption></figcaption></figure>

Click on "Connect Wallet" in the top right

<figure><img src="/files/TLLsDIJVXw6TQFLdRT6s" alt=""><figcaption></figcaption></figure>

Click on "Archway Wallet" to connect your wallet to the platform

<figure><img src="/files/MBD3sz8gu07ozHEnerFx" alt=""><figcaption></figcaption></figure>

If your interface looks like this, you have ARCH and/or sARCH tokens that are ready to be claimed. Click "Claim"

<figure><img src="/files/RjNpvB0ZqWZfxlW5fAg7" alt=""><figcaption></figcaption></figure>

Ensure the confirmation message looks correct and then click "Claim" again

<figure><img src="/files/ifwikJogcMzhWAc4foq3" alt=""><figcaption></figcaption></figure>

It's recommended (if using Keplr) to click on Transaction Fee -> Low to ensure you are paying a lower transaction fee. Once satisfied with the wallet confirmation, click "Approve" to submit the transaction

<figure><img src="/files/fPl767cHoVgDiOyWJzGt" alt=""><figcaption></figcaption></figure>

Congrats! If your transaction was sent successfully to the Archway blockchain you have now claimed your ARCH and/or sARCH rewards and they should be in your wallet 🚀


# Technical

Learn about the following in this section:

* [Liquid Finance's Technical Specification](/technical/liquid-finance-technical-specification)


# Liquid Finance Technical Specification

Introduction

This document describes the implementation of the Liquid Finance Smart Contract Layer.

### Architecture overview <a href="#heading-h.1fob9te" id="heading-h.1fob9te"></a>

The figure below is the core flows of contracts interaction:

![](/files/08qSmJ9WxYmknJkHxekV)

With the current design, we have 8 contracts in total:

* **Liquid Staking**: for staking, unstaking and claiming unstaked tokens.
* **Liquid Swap**: acts as the swap contract for the liquid staking token to the native token.
* **Liquid Token**: is cw20-base contract.
  * [Document and source](https://github.com/CosmWasm/cw-plus/tree/main/contracts/cw20-base)
* **Liquid Treasury**: store incentives for many different uses.
* **Multisig**: the admin of all the contracts in the platform.
  * [Document and source](https://github.com/CosmWasm/cw-plus/tree/main/contracts/cw3-flex-multisig)
* **Group**: contain the whitelist of members who can sign the multisig contract action.
  * [Document and source](https://github.com/CosmWasm/cw-plus/tree/main/contracts/cw4-group)
* **Liquid Looping**: make sure depositors’ ARCHs keep staying in the liquidity pool to receive LP rewards.

### Implementation detail <a href="#heading-h.3znysh7" id="heading-h.3znysh7"></a>

### A. Liquid Staking <a href="#heading-h.2et92p0" id="heading-h.2et92p0"></a>

This contract is a staking pool for users to deposit native tokens in and receive liquid staking tokens in return. The contract bonds users tokens to a whitelist of validators and auto-compounds rewards (bond earned staking rewards) to increase the users interest rate.<br>

New deposits are used to process users unstaking requests, so unstaking here can be faster than the typical unbonding duration.

**Data Source**

* **admin** (Addr): should be multi-sig, is able to update the config.
* **pause\_admin** (Addr): should be single-sig, is able to pause the contract.
* **bond\_denom** (String): the denomination of the native token that can be staked.
* **liquid\_token\_addr** (Addr): Liquid Token contract address.
* **swap\_contract\_addr** (Addr): Liquid Swap contract address.
* **treasury\_contract\_addr** (Addr): Liquid Treasury contract address.
* **team\_wallet\_addr** (Addr): team wallet address.
* **commission\_percentage** (u16): percentage of commission taken off of staking rewards.
* **team\_percentage** (u16): percentage of rewards for the team.
* **liquidity\_percentage** (u16): percentage of rewards for the liquidity providers.
* **delegations** (Vec\<DelegationPercentage>): a whitelist of validators, each validator has a delegation percentage.
* **contract\_state** (Uint128): the state of contract (true is active, false is paused).
* **native** (Uint128): total supply of native token pool.
* **unstakings** (Uint128): total amount of native tokens in the unstaking queue.
* **claims** (Uint128): total amount of native token reserved paying back those who unstaked.
* **maximum\_processed** (Uint128): max processing amount allowed in the queue in a processed\_time period.
* **current\_processed** (Uint128): total processed amount in the queue for the current period.
* **processed\_time** (u64): the minimum number of blocks until the current\_processed reset to Zero.
* **processed\_period** (Expiration): unstaking queue can only process after this period.
* **unstaking\_time** (u64): the minimum number of blocks between each contract unbond request.
* **unstaking\_period** (Expiration): contract only unbond from delegators after this period.
* **mint\_cap** (Uint128): max amount of liquid token can be minted.
* **CLAIMABLE** (Map<\&Addr, Uint128>): store the claimable native token amounts of each address.
* **UNDER\_UNSTAKING** (Map<\&Addr, Uint128>): store the total native token amounts waiting in the unstaking queue of each address.
* **staking\_linked\_list**: store unstaking queue data.

**Messages**

* Stake { to: Option\<String> } - Moves native tokens sent along the message to the staking pool, and gives back liquid staking tokens to the sender (or to the address sender put into the optional to param).
* Claim {} - Gives sender their claimable unstaked native token, should be called after the sender's unstaking request is processed.
* SetAdmin { admin: Option\<String>, pause\_admin: Option\<String> } - Updates admin’s addresses, only the current admin can call this.
* SetContractState { state: bool } - Updates contract state (active or paused), only the current admin and pause admin can call this.
* SetLiquidToken { address: String } - Set the liquid token address, only the admin can call this. This can only be called once after deploying the liquid token contract.
* SetRewardsConfig { swap\_contract\_addr: Option\<String>, treasury\_contract\_addr: Option\<String>, team\_wallet\_addr: Option\<String>, commission\_percentage: Option\<u16>, team\_percentage: Option\<u16>, liquidity\_percentage: Option\<u16> } - Update the configs relate to the incentives handling of staking rewards.
* SetLimitConfig { maximum\_processed: Option\<Uint128>, processed\_time: Option\<Uint128>, unstaking\_time: Option\<Uint128>, mint\_cap: Option\<Uint128> } - Update the limit configs.
* SetDelegations { delegations: Vec\<DelegationPercentage> } - Update the validators whitelist, only the admin can call this.
* BondUnbondValidators {} - Bond available coin or unbond to process unstaking requests.
* ProcessUnstakingQueue {} - Use available coin to process unstaking requests.
* DistributeRewards {} - Distribute staking rewards.
* BotRoutine {} Bot or users call this daily to multicall the following: DistributeRewards, ProcessUnstakingQueue, BondUnbondValidators.
* Receive(Cw20ReceiveMsg) - handle Send messages from cw20 token contract, only the liquid token contract can call this. This is for the unstaking process.

**Queries**

* ClaimableOf { address: String } - Returns the amount of native tokens the address can claim. Returns "0" if the address is unknown to the contract. Return type is:

  ```rust
  pub struct BalanceResponse {
      pub balance: Uint128,
  }
  ```
* ConfigInfo {} - Returns the configuration of the contract. Return type is:

  ```rust
  pub struct ConfigResponse {
      /// Should be multi-sig, is able to update the config
      pub admin: String,
      /// Should be single-sig, is able to pause the contract
      pub pause_admin: String,
      /// This is the denomination we can stake (and only one we accept for payments)
      pub bond_denom: String,
      /// Liquid token address
      pub liquid_token_addr: String,
      /// Swap contract address
      pub swap_contract_addr: String,
      /// Liquid Treasury contract address
      pub treasury_contract_addr: String,
      /// Team wallet address
      pub team_wallet_addr: String,
      /// percentage of commission taken off of staking rewards
      pub commission_percentage: u16,
      /// percentage of rewards for the team
      pub team_percentage: u16,
      /// percentage of rewards for the liquidity providers
      pub liquidity_percentage: u16,
      /// Delegations preferences for a whitelist of validators, each validator has a delegation percentage
      pub delegations: Vec<DelegationPercentage>,
      /// contract state (active/paused)
      pub contract_state: bool,
  }
  ```
* StatusInfo {} - Returns the staking status of the contract. Return type is:

  ```rust
  pub struct StatusResponse {
      /// issued is how many derivative tokens this contract has issued
      pub issued: Uint128,
      /// native is how many total supply of native tokens liquid token holders can withdraw
      pub native: Coin,
      /// unstakings is how many total native tokens in unstaking queue
      pub unstakings: Uint128,
      /// claims is how many tokens need to be reserved paying back those who unbonded
      pub claims: Uint128,
      /// bonded is how many native tokens exist bonded to the validator
      pub bonded: Uint128,
      /// available native token balance of this contract
      pub balance: Uint128,
      /// ratio of native / issued (or how many native tokens that one derivative token is nominally worth)
      pub ratio: Decimal,
  }
  ```
* UnstakingQueue {} - Returns the first 50 nodes in the unstaking queue of the contract. Return type is:

  ```rust
  pub struct UnstakingQueueResponse {
      pub state: LinkedList,
      pub queue: Vec<NodeWithId>,
  }
  ```
* UnderUnstakingOf { address: String } - Returns the total amount of native token the address has in the unstaking queue. Return type is:

  ```rust
  pub struct BalanceResponse {
      pub balance: Uint128,
  }
  ```
* LimitInfo {} - Returns the limit status of the contract. Return type is:

  ```rust
  pub struct LimitResponse {
      /// current max unstake processing amount allowed in the period
      pub maximum_processed: Uint128,
      // total processed amount for the current period
      pub current_processed: Uint128,
      // the minimum number of blocks between each unstake processing limit period
      pub processed_time: u64,
      // current_processed reset to 0 after this period
      pub processed_period: Expiration,
      /// the minimum number of blocks between each contract unstaking request
      pub unstaking_time: u64,
      /// contract can only call unbound after this period
      pub unstaking_period: Expiration,
      /// current max amount of liquid token can be minted
      pub mint_cap: Uint128,
  }
  ```
* UnclaimedRewards { address: String } - Returns the unclaimed staking rewards. Return type is:

  ```rust
  pub struct UnclaimedRewardsResponse {
      /// the unclaimed rewards for the team
      pub team_portion: Uint128,
      /// the unclaimed rewards for liquidity providers
      pub liquidity_portion: Uint128,
      /// the unclaimed rewards for treasury
      pub treasury_portion: Uint128,
      // the unclaimed rewards for liquid token holders
      pub staking_pool: Uint128,
  }
  ```

### B. Liquid Swap <a href="#heading-h.tyjcwt" id="heading-h.tyjcwt"></a>

This contract is the instant unstaking swap pool for those who want to convert liquid staking tokens to native tokens without waiting for the delayed unstaking period. Liquidity providers for this pool receive some percentage of staking rewards from the Liquid Staking contract. Rewards contract receives the swap fee.

**Data Source**

* **admin** (Addr): should be multi-sig, is able to update the config.
* **pause\_admin** (Addr): should be single-sig, is able to pause the contract.
* **bond\_denom** (String): the denomination of the native token that can be staked.
* **liquid\_token\_addr** (Addr): Liquid Token contract address.
* **staking\_manager\_addr** (Addr): Liquid Staking contract address.
* **treasury\_contract\_addr** (Addr): Liquid Treasury contract address.
* **team\_wallet\_addr** (Addr): team wallet address.
* **swap\_fee\_percentage** (u16): percentage of liquid token taken as fee from instant unstakers.
* **team\_percentage** (u16): percentage of swap fee for the team.
* **liquidity\_min** (Uint128): minimal amount of new native token being added for liquidity.
* **contract\_state** (Uint128): the state of contract (true is active, false is paused).
* **liquidity** (Uint128): the total amount of native token supplied to the liquidity pool.
* **issued** (Uint128): total supply of rewards shares this contract has issued.
* **claims** (Uint128): the total amount of swapped liquid token that liquidity providers can claim.
* **total\_unclaimed** (Uint128): the total amount of native token rewards that liquidity providers can claim.
* **CLAIMABLE** (Map<\&Addr, Uint128>): store the claimable staked token amount of each address.
* **UNCLAIMED** (Map<\&Addr, Uint128>): store the claimable native token amount of each address.
* **QUEUE\_ID** (Map<\&Addr, Uint128>): store the linked list queue id of each address.
* **swap\_linked\_list**: store liquidity queue data.

**Messages**

* Add {} - Moves native tokens sent along the message to the swap pool, and updates sender account in the liquidity queue.
* Remove {} - Liquidity providers call this to withdraw all their native tokens from the liquidity pool.
* Claim {} - Gives sender his claimable swapped liquid token, and native token rewards for being liquidity provider.
* SetAdmin { admin: Option\<String>, pause\_admin: Option\<String> } - Updates admin’s addresses, only the current admin can call this.
* SetContractState { state: bool } - Updates contract state (active or paused), only the current admin and pause admin can call this.
* SetRewardsConfig { team\_wallet\_addr: Option\<String>, swap\_fee\_percentage: Option\<u16>, team\_percentage: Option\<u16> } - Update the configs relate to the incentives handling of swap fee.
* SetLiquidityMin { liquidity\_min: Uint128 } - Updates the minimum amount of native token being added as liquidity, only the admin can call this.
* Receive(Cw20ReceiveMsg) - Handle Send messages from cw20 token contract. This is for swapping cw20 liquid token sender to native token.

**Queries**

* ClaimableOf { address: String } - Returns the claimable swapped liquid token and native token rewards the address can claim. Return type is:

  ```rust
  pub struct RewardsResponse {
      pub staked_token: Uint128,
      pub native_token: Uint128,
  }
  ```
* ConfigInfo {} - Returns the configuration of the contract. Return type is:

  ```rust
  pub struct ConfigResponse {
      /// should be multi-sig, is able to update the config
      pub admin: String,
      /// should be single-sig, is able to pause the contract
      pub pause_admin: String,
      /// This is the denomination we can stake (and only one we accept for payments)
      pub bond_denom: String,
      /// Liquid token address
      pub liquid_token_addr: String,
      /// Staking manager contract address
      pub staking_manager_addr: String,
      /// Liquid Treasury contract address
      pub treasury_contract_addr: String,
      /// This is the team wallet address
      pub team_wallet_addr: String,
      /// Swap fee
      pub swap_fee_percentage: u16,
      /// team percentage of swap fee
      pub team_percentage: u16,
      /// Minimal amount of new native token being added for liquidity
      pub liquidity_min: Uint128,
      /// contract state (active/paused)
      pub contract_state: bool,
  }
  ```
* StatusInfo {} - Returns the staking status of the contract. Return type is:

  ```rust
  pub struct StatusResponse {
      /// issued is how many rewards shares this contract has issued
      pub issued: Uint128,
      /// claims is how many tokens need to be reserved paying back those who unbonded
      pub claims: Uint128,
      /// available native token balance of this contract
      pub balance: Uint128,
      /// available native token balance to claim
      pub unclaimed_balance: Uint128,
      /// ratio of balance / issued (or how many native tokens that one rewards share is nominally worth)
      pub ratio: Decimal,
      /// total liquidity supply of this contract
      pub liquidity: Uint128,
  }
  ```
* OrderBook {} - Returns the first 50 orders in the liquidity queue. Return type is:

  ```rust
  pub struct OrderBookResponse {
      pub state: LinkedList,
      pub queue: Vec<NodeWithId>,
  }
  ```
* OrderInfoOf { address: String } - Returns the order info of the address in the liquidity queue. Return type is:

  ```rust
  pub struct OrderInfoOfResponse {
      /// issued is how many rewards shares in the pool this address has
      pub issued: Uint128,
      /// native is how many native tokens in the pool this address has
      pub native: Uint128,
      /// the block height shows when this address added native token to the pool
      pub height: u64,
      /// node_id is the id of adddress order in the linked-list
      pub node_id: u64,
      /// last deposit
      pub last_deposit: Uint128,
  }
  ```
* Simulation { offer\_asset: Asset } - Return the amount of native token swapper should get. Return type is:

  ```rust
  pub struct SimulationResponse {
      pub return_amount: Uint128,
      pub spread_amount: Uint128,
      pub commission_amount: Uint128,
  }
  ```
* ReverseSimulation { ask\_asset: Asset } - Return the amount of liquid token swapper should put in to get an ask\_asset. Return type is:

  ```rust
  pub struct ReverseSimulationResponse {
      pub offer_amount: Uint128,
      pub spread_amount: Uint128,
      pub commission_amount: Uint128,
  }
  ```

### C. Liquid Treasury <a href="#heading-h.3dy6vkm" id="heading-h.3dy6vkm"></a>

The Liquid Treasury contract can be used to store incentives to be distributed towards different protocols, supplement the instant unstaking pool incentives, provide liquidity and/or be used as an insurance fund for slashing risk on the Liquid Staking ARCH pool.

**Data Source**

* **admin** (Addr): able to update the config.
* **archway\_rewards** (Vec\<ArchwayRewardsPercentage>): a whitelist of archway rewards receiver with percentage.

**Messages**

* Distribute { asset\_info: AssetInfo, to: Vec\<SendingInfo> } - Sends a specific token, be native or cw20 token, to a list of receivers. Only the admin can call this.
* SetAdmin { address: String } - Updates admin’s address, only the current admin can call this.
* SetRewardsConfig{ archway\_rewards: Vec } - Updates Archway rewards config, only the current admin can call this.
* DistributeArchwayRewards {} - Claim and distribute archway rewards to whitelist receivers.

**Queries**

* ConfigInfo {} - Returns the configuration of the contract. Return type is:

  ```rust
  pub struct ConfigResponse {
      pub admin: String,
      pub archway_rewards: Vec<ArchwayRewardsPercentage>,
  }
  ```
* OutstandingRewards {} - Returns the claimable rewards of the contract. Return type is:

  ```rust
  pub struct OutstandingRewardsResponse {
      pub rewards_balance: Coins,
      pub total_records: u64,
  }
  ```
* UnclaimedRewardsDistribution {} - Returns the detail of distribution for unclaimed archway rewards. Return type is:

  ```rust
  pub struct UnclaimedRewardsDistributionResponse {
      pub asset_info: AssetInfo,
      pub to: Vec<SendingInfo>
  }
  ```

### E. Liquid Looping <a href="#heading-h.4d34og8" id="heading-h.4d34og8"></a>

This is the contract for liquidity providers to deposit ARCH tokens in order to automatically earn LP rewards without having to manually claim rewards, unstake swapped sARCH then re-add liquidity.

The figure below is the token flows of loop liquidity:

![](/files/mqtSsbduIZXyma5R0n4m)

**Data Source**

* **admin** (Addr): should be multi-sig, is able to update the config.
* **pause\_admin** (Addr): should be single-sig, is able to pause the contract.
* **bond\_denom** (String): the denomination of the native token that can be staked.
* **liquid\_token\_addr** (Addr): Liquid Token contract address.
* **staking\_manager\_addr** (Addr): Liquid Staking contract address.
* **swap\_contract\_addr** (Addr): Liquid Swap contract address.
* **contract\_state** (Uint128): the state of contract (true is active, false is paused).
* **issued** (Uint128): total supply of loop shares this contract has issued.
* **withdrawings** (Uint128): total amount of native token in the withdrawing queue.
* **claims** (Uint128): total amount of native tokens reserved for paying back those who withdrew their shares.
* **LOOP\_SHARE** (Map<\&Addr, Uint128>): store the liquidity shares of each address.
* **CLAIMABLE** (Map<\&Addr, Uint128>): store the claimable native token amount of each address.
* **UNDER\_WITHDRAWING** (Map<\&Addr, Uint128>): store the total native token amount waiting in the withdrawing queue of each address.
* **linked\_list** (staking\_linked\_list): store withdrawing queue data.

**Messages**

* Deposit {} - Moves native tokens sent along the message to the instant unstaking liquidity pool, and gives back loop shares to the sender to represent his liquidity.
* Withdraw { amount: Uint128 } - Withdraw liquidity from the instant unstaking liquidity pool by putting the representive loop shares amount in the param.
* Claim {} - Gives sender his claimable withdrawn native token, should be called after sender’s withdrawing request is processed.
* SetAdmin { admin: Option\<String>, pause\_admin: Option\<String> } - Updates admin’s addresses, only the current admin can call this.
* SetContractState { state: bool } - Updates contract state (active or paused), only the current admin and pause admin can call this.

**Queries**

* Balance { address: String } - Returns the loop shares the address has that represents his liquidity. Returns "0" if the address is unknown to the contract. Return type is:

  ```rust
  pub struct BalanceResponse {
      pub balance: Uint128,
  }
  ```
* ClaimableOf { address: String } - Returns the amount of native token the address can claim. Returns "0" if the address is unknown to the contract. Return type is:

  ```rust
  pub struct BalanceResponse {
      pub balance: Uint128,
  }
  ```
* ConfigInfo {} - Returns the configuration of the contract. Return type is:

  ```rust
  pub struct ConfigResponse {
      /// should be multi-sig, is able to update the config
      pub admin: String,
      /// should be single-sig, is able to pause the contract
      pub pause_admin: String,
      /// This is the denomination we can stake (and only one we accept for payments)
      pub bond_denom: String,
      /// Liquid token address
      pub liquid_token_addr: String,
      /// Staking manager contract address
      pub staking_manager_addr: String,
      /// Swap contract address
      pub swap_contract_addr: String,
      /// contract state (active/paused)
      pub contract_state: bool,
  }
  ```
* StatusInfo {} - Returns the status of the contract. Return type is:

  ```rust
  pub struct StatusResponse {
      /// issued is how many loop shares this contract has issued
      pub issued: Uint128,
      /// total supply of native token deposit pool
      pub native: Coin,
      /// claims is how many tokens need to be reserved paying back those who withdrawed
      pub claims: Uint128,
      /// total amount of native token in the withdraw queue
      pub withdrawings: Uint128,
      /// total amount of native token in the unstake queue and liquidity pool
      pub locked_native: Uint128,
      /// total amount of unclaimed native unstaked token and rewards
      pub unclaimed_native: Uint128,
      /// total amount of unclaimed swapped staked token and stake token balance (in native value)
      pub staked_to_native: Uint128,
      /// available native balance, should always be Zero
      pub available_balance: Uint128,
      /// ratio of native / issued (or how many native tokens that one loop share is nominally worth)
      pub ratio: Decimal,
  }
  ```
* WithdrawingQueue {} - Returns the first 50 nodes in the withdrawing queue of the contract. Return type is:

  ```rust
  pub struct WithdrawingQueueResponse {
      pub state: LinkedList,
      pub queue: Vec<NodeWithId>,
  }
  ```
* UnderWithdrawingOf { address: String } - Returns the total amount of native token the address has in the withdrawing queue. Return type is:

  ```rust
  pub struct BalanceResponse {
      pub balance: Uint128,
  }
  ```

### Workflows <a href="#heading-h.2s8eyo1" id="heading-h.2s8eyo1"></a>

### Staking ARCH <a href="#heading-h.17dp8vu" id="heading-h.17dp8vu"></a>

![](/files/lOLzH0KV1fVaOxa1910L)

### Delayed Unstaking sARCH <a href="#heading-h.3rdcrjn" id="heading-h.3rdcrjn"></a>

![](/files/FDrLJPM5tLchF9NVhHAE)

### Provide liquidity for the Instant Unstaking Pool <a href="#heading-h.26in1rg" id="heading-h.26in1rg"></a>

![](/files/LDvf8NroJrtG5k4Ica9i)

### Instant Unstaking sARCH <a href="#heading-h.lnxbz9" id="heading-h.lnxbz9"></a>

![](/files/I7XimiP0oV0Ta65HvLKJ)

### Remove liquidity from the Instant Unstaking Pool <a href="#heading-h.35nkun2" id="heading-h.35nkun2"></a>

![](/files/anz9E7i7bD7dhGiKPR1X)

### Liquidity providers claim ARCH incentives and swapped sARCH <a href="#heading-h.1ksv4uv" id="heading-h.1ksv4uv"></a>

![](/files/2M3ZtWa1nbxPFkO0oPnL)

### Deposit ARCH liquidity to the Liquid Looping contract <a href="#heading-h.44sinio" id="heading-h.44sinio"></a>

![](/files/Zbi9qodZ87G3TbllG4GW)

### Withdraw ARCH liquidity from the Liquid Looping contract <a href="#heading-h.2jxsxqh" id="heading-h.2jxsxqh"></a>

![](/files/MS9uNNvTkxb6eYzIB2et)

### Security <a href="#heading-h.z337ya" id="heading-h.z337ya"></a>

### A. Validator multisig <a href="#heading-h.3j2qqm3" id="heading-h.3j2qqm3"></a>

Validator multisig owns the Liquid Staking, Liquid Swap, Liquid Token, Multisig, Group and Liquid Looping smart contracts. Multisig signers are in charge of governing the upgradeability of these smart contracts, the addition/removal of multisig signers, the addition/removal of participants within the Validator set and changing the protocol’s configuration parameters.

Functions controlled by Validator multisig:

* Liquid Staking
  * SetAdmin { admin: Option\<String>, pause\_admin: Option\<String> }
  * SetContractState { state: bool }
  * SetRewardsConfig { swap\_contract\_addr: Option\<String>, treasury\_contract\_addr: Option\<String>, team\_wallet\_addr: Option\<String>, commission\_percentage: Option\<u16>, team\_percentage: Option\<u16>, liquidity\_percentage: Option\<u16> }
  * SetLimitConfig { maximum\_processed: Option\<Uint128>, processed\_time: Option\<Uint128>, unstaking\_time: Option\<Uint128>, mint\_cap: Option\<Uint128> }&#x20;
  * SetDelegations { delegations: Vec\<DelegationPercentage> }
* Liquid Swap
  * SetAdmin { admin: Option\<String>, pause\_admin: Option\<String> }
  * SetContractState { state: bool }
  * SetRewardsConfig { team\_wallet\_addr: Option\<String>, swap\_fee\_percentage: Option\<u16>, team\_percentage: Option\<u16> }
  * SetLiquidityMin { liquidity\_min: Uint128 }
* Liquid Token
  * None
* Multisig
  * [CW3-flex-multisig](https://github.com/CosmWasm/cw-plus/blob/main/contracts/cw3-flex-multisig/README.md)
  * Propose{title, description, msgs, earliest, latest}
    * Proposals should be limited to multisig participants only (This is not in the spec but left open to the implementation)
  * Vote{proposal\_id, vote}
    * Voters should only be able to vote yes or no
  * Execute{proposal\_id}
  * Close{proposal\_id}
* Group
  * [CW4-group](https://github.com/CosmWasm/cw-plus/blob/main/contracts/cw4-group/README.md)
  * Members are defined by an address and a weight.
    * Each member gets a weight of 1. If our multisig has 9 participants we will require a weight of 5 yes votes for the proposal to pass
  * UpdateAdmin{admin}
  * AddHook{addr}
  * RemoveHook{addr}
* Liquid Looping
  * SetAdmin { admin: Option\<String>, pause\_admin: Option\<String> }
  * SetContractState { state: bool }

### B. Team wallet <a href="#heading-h.1y810tw" id="heading-h.1y810tw"></a>

Lydia Labs team wallet owns the Treasury smart contract. This will allow the LL team to distribute incentives across different strategies in an efficient manner.

Functions controlled by LL team wallet:

* Treasury
  * Distribute { asset\_info: AssetInfo, to: Vec\<SendingInfo> }
  * SetAdmin { address: String }
  * SetRewardsConfig{ archway\_rewards: Vec }


# Security

Learn about the following in this section:

* [Liquid Finance multisig](/security/multisig)
* [Liquid Finance risks](/security/risks)


# Multisig

Liquid Finance has a multisig that governs the main smart contracts of the protocol. The multisig group is composed of 5 validators within the Archway Network.&#x20;

Multisig signers are in charge of governing the upgradeability of these smart contracts, the addition/removal of multisig signers, the addition/removal of participants within the Validator set and changing the protocol’s configuration parameters.

Currently, the multisig signers also compose the Liquid Finance whitelisted validator set. This validator set receives the delegation from the Liquid Finance Stake Pool which is distributed evenly across the set.

Our multisig signers are the following:

1. Lydia Labs
   * Signer wallet: archway155yrpskd0zc4zcgxja8095ves4te5sjry8f25m
2. DSRV
   * Signer wallet: archway1zttnm2cl60m5ffsrfeqtzkmtvepl4hwndgpfm5
3. P2P Validator
   * Signer wallet: archway17asaxre8kqqx7q0c4scgpaahlxjp0aqf0fswvs
4. B-Harvest
   * Signer wallet: archway184nalnwd3tjpdc4sfw5e70ttzgkdypduj83k4p
5. Cosmostation
   * Signer wallet: archway15xeweuucx5f30erc5934pfapywfm5uf9kczhdv


# Risks

**Smart contract risk.** Liquid Finance smart contracts have not yet been audited. There’s always the possibility of a bug or vulnerability that compromises participants’ funds. It may not be possible to recover these funds.

**Slashing risk.** Liquid Finance delegates user's voting power from their staked ARCH across a whitelisted validator set. If a validator fails to perform their job efficiently and gets penalized via slashing of staked funds the stake pool would decrease in value. It may not be possible to recover these funds.


# Community Resources

Learn about the following in this section:

* [Liquid Finance official links](/community-resources/official-links)
* [Liquid Finance Archway Mainnet smart contract addresses](/community-resources/archway-mainnet)
* [Liquid Finance Archway Testnet smart contract addresses](/community-resources/archway-constantine)
* [Liquid Finance Terms of Service](/community-resources/terms-of-service)
* [Liquid Finance wallet connections](/community-resources/wallets)


# Official Links

Below are the official social media accounts of Liquid Finance:

**Landing Page:** <https://liquidfinance.xyz/>

**Mainnet App:** [https://app.liquidfinance.xyz/](https://test.liquidfinance.xyz/)

**Testnet App:** <https://test.liquidfinance.xyz/>

**Twitter:** <https://twitter.com/liquid_finance>

**Discord:** <http://discord.gg/YAh5uBHHWp>


# Archway Mainnet

Below are the smart contract addresses for Archway Mainnet:

Below are the smart contract addresses for Archway mainnet:

**Liquid Staking**

archway1p3wrpsrxldc6laecc8r3ck52cmg3chu06mmm3thqvt6exy36f79q575rsq

**Liquid Finance Staked ARCH**

archway1t2llqsvwwunf98v692nqd5juudcmmlu3zk55utx7xtfvznel030saclvq6

**Liquid Treasury**

archway1f85m6phqgw7ucyrl4tpe3v2ytz4udf5jeu5pzqcxv2tjw22lf9rse8hx49

**Liquid Swap**

archway1ywv0gxrw3kv25kn9f05dtqf6577fer5pc2vewvgcagpm5p8l4kuqc4qfp6

**Liquid Looping**

archway19kpy32avnny2g9gjygrl8vfxketgywr7mmc8xvyua0n0wdwjxjxqn0kuje

**Group**

archway15pz4s3hp0jded287h2gtwr752v8e3k47e4a07xtd90fu5r5t5g2syg33pg

**Multisig**

archway1fepswjwdt3heatn7nh8h88r363ay3px7xz0y5re47vfte6h49qqsvrzq5g


# Archway Constantine

Below are the smart contract addresses for Archway Constantine-3 testnet:

Below are the smart contract addresses for Archway Constantine-3 testnet:

**Liquid Staking**

archway1g7f42j7mvv75kfn5zwrkcpn5fdqrhwymkjaftevhg69u0t8mc0ls9d39pr

**Liquid Finance Staked ARCH**

archway1erqguqc3hmfajgu7e2dvgaccx6feu5ru3gyatdxu94p66j9hp7msn2kcqp

**Liquid Treasury**

archway1p7r22tmhnjrv8l2uxrxjw8yteqn077ds77gp4rf7everg4n2x3jqaf7kds

**Liquid Swap**

archway1wwsvs9nyldsuk3sen36zh2kvxzpc4wg0z9afnz9n25hx22hsxapqfceh3d

**Liquid Looping**

archway12hh0323ezpa7z02dugj6fx95jcskwz9quhxwje705629c5clc8cquajfct

**Group**

archway125k87l8vq2ad9we2m4u30grvrp8dd6vndm95ecqfr8cxmdu3d3ssq8a6ed

**Multisig**

archway19v3herxcvuhkng5rel3fd8fklv3zz6jltk69drvhyvnr7fzjhh2qv2kqvw


# Terms of Service

Liquid Finance is a liquid staking protocol for the creation of a synthetic staked Archway token. The protocol consists of smart contracts that are deployed on the Archway blockchain.

Use of Liquid Finance involves various risks, including, but not limited to, losses in connection with the deposit of digital assets to the Liquid Finance protocol from smart contract risk.  Additionally, while early contributors have taken substantial effort to be resistant to an attack, assets on the protocol may be subject to exploitation, theft, and/or fraud; hackers or other malicious groups or organizations may attempt to interfere with the protocol in various ways, including malware attacks, denial of service attacks, consensus-based attacks, spoofing, and other similar tactics which may result in the loss of your assets, or the loss of your ability to access or control your assets. In such an event, there may be no remedy, and holders of virtual assets are not guaranteed any remedy, refund, or compensation. In particular, note that any third party who gains access to your private login credentials may be able to sell, dispose, or transfer your assets.

Liquid Finance may contain links to third party websites, forums, or applications. Liquid Finance does not make any warranty about services run by others, or content they may provide. Use of services run by others may be governed by other terms between you and the entity running the other service.

Before using the Liquid Finance protocol, you should perform all necessary due diligence to make sure you understand how Liquid Finance and liquid staking work, and the risks associated with your use of the Liquid Finance protocol. Liquid Finance is accessible, or will be accessible through a variety of web and mobile interfaces; your use of any such interfaces may subject you to costs imposed in connection therewith, and additional risks relating to the use thereof. Before accessing Liquid Finance through a web or mobile interface, you should perform all necessary due diligence to ensure that you fully understand any costs, conditions, and risks associated with such interfaces.

BY ACCESSING LIQUID FINANCE, YOU ACKNOWLEDGE AND AGREE THAT YOUR USE OF THE LIQUID FINANCE IS ENTIRELY AT YOUR OWN RISK. The Liquid Finance protocol is available for use to the public on an “as-is” basis, and no representations or warranties of any kind are made with respect to the Liquid Finance protocol, its operations and functionality, or its fitness for any specific purpose.

The Liquid Finance protocol is operated by smart contracts deployed on the Archway blockchain. Although early contributors, along with various partners, were involved in the development of the code for Liquid Finance, the early contributors do not own, control, offer, or provide the Liquid Finance protocol for use to the public. No entity or individual, including, without limitation, the early contributors, their partners, and the respective founders, officers, employees, agents, or representatives, will be liable for any losses, claims or damages whatsoever associated with the Liquid Finance protocol, including any direct, indirect, incidental, special, exemplary, punitive or consequential damages, or loss of profits, cryptocurrencies, tokens, or anything else of value. All risk of loss is borne by the user.


# Wallets

Below are the wallets that can be used to interact with Liquid Finance App:

Below are the wallets that can be used to interact with Liquid Finance App:

Keplr

ArchX Wallet&#x20;

Leap&#x20;

Cosmostation&#x20;


# FAQ

Answers to frequently asked questions about Liquid Finance.

#### What is Liquid Staking?

* Liquid staking is a concept that allows individuals to stake their tokens while still maintaining access to their liquidity. This is achieved through the creation of liquid staking tokens, which serve as on-chain representations of the staked assets and act as a claim on the underlying staking positions

**How do I receive my ARCH staking rewards?**

* Your staking rewards accrue within the Liquid Finance stake pool and are reflected in the ARCH/sARCH exchange rate on the protocol. When staking rewards are claimed and the staked again within the smart contract, the exchange rate for ARCH -> sARCH increases. This means that when a user wants to redeem their sARCH -> ARCH they will be able to claim more ARCH than they originally deposited

**What is the Instant Unstaking Queue?**

* The Instant Unstaking Queue is essentially a one-sided liquidity pool within the Liquid Finance protocol that provides liquidity for sARCH holders who would like to redeem their sARCH instantaneously without waiting for the typical unbonding period
* The Instant Unstaking Queue works on a First-In-First-Out basis where the first user to provide liquidity into the queue is the first person to have their ARCH tokens swapped for sARCH
* For more information on the Instant Unstaking Queue, please see ["Providing Liquidity"](/protocol-features/providing-liquidity)

**How is the Projected Staking APY calculated?**

* The projected APY for staking your ARCH tokens within the Liquid Finance protocol is based on the previous 1 hour and is calculated by:
  * `Projected Staking APY`
    * `daily_increased_staking_rate = (staking_rate[lastest_record] - staking_rate[lastest_record - 1 hour]) * 24`
    * `staking_APY = [(1 + daily_increased_staking_rate)^365] - 1`

**How often are staking rewards compounded?**

* Staking rewards generated by the Liquid Finance protocol are claimed and then re-staked within the protocol on a daily basis

**How are protocol incentives generated?**

* Liquid Finance generates incentives from its Stake Pool and from the Archway Value Capture engine. 10% of all the staking rewards generated within the protocol are taken as a commission with the majority redistributed by to liquidity providers of the Instant Unstaking Queue. Liquid Finance smart contracts also generate rewards from usage via Archway Inflation and Gas Rebates, all of which are currently distributed back into the protocol as well
* For more information on Liquid Finance fees + incentives, please see ["Fees + Incentives"](/economics/fees-+-incentives)

**How is the Projected LP APY calculated?**

* The projected APY for providing liquidity in the Instant Unstaking Queue is based on the previous 24 hours and is calculated by:
  * `Projected LP APY`
    * `LP_rate is used to calculate ARCH rewards for LPers:`&#x20;
      * `LP_rate = (total_ARCH_liquidity + total_ARCH_rewards) / (total_LP_token_supply)`
    * `daily_increased_LP_rate = LP_rate[lastest_record] - LP_rate[lastest_record - 24 hours]`
    * `LP_APY = daily_increased_LP_rate * 365`

**How often are LP rewards distributed?**

* A liquidity provider within the Instant Unstaking Pool will see their rewards increase in real-time on a block-by-block basis based on the amount of unclaimed ARCH tokens in the Stake Pool.&#x20;
* LPs are able to claim their rewards at any time as long as they have a non-zero amount of ARCH earned

**How is the exchange rate calculated?**

* `ARCH-sARCH exchange rate:`
  * `daily_increased_staking_rate = (staking_rate[lastest_record] - staking_rate[lastest_record - 1 hour]) * 24`
  * `staking_APY = [(1 + daily_increased_staking_rate)^365] - 1`

**Why is the maximum unstaking period \~25 days?**

* Cosmos SDK chains (Archway included) typically don't allow for one account to have more than 7 unique unstaking requests at any given time resulting in Liquid Finance processing unstaking requests every 4 days. Typically it will take between 21 to 25 days to complete your ARCH unstaking before it's ready to claim, however based on the Liquid Finance architecture there is a chance this time could be significantly reduced as new ARCH deposits and claimed ARCH staking rewards are first paired with delayed unstaking requests before being staked within the protocol.

**What's the current set of validators that receive delegation from staked ARCH in Liquid Finance?**

* Currently ARCH deposited into Liquid Finance is staked + delegated across 5 validators: Lydia Labs, DSRV, Cosmostation, P2P and B-Harvest

**Does sARCH qualify for governance voting on Archway Network proposals?**

* No, currently holders of sARCH are not qualified to vote on Archway Network governance proposals. Voting power is delegated to the Validator set above

**How do I add my sARCH token to Keplr?**

1. Click on the three bars in the top left of the browser extension&#x20;
2. Select "Add Token"
3. Ensure that the Archway mainnet network is selected&#x20;
4. Click "Add Token"&#x20;
5. In the "Contract Address" field, insert: archway1t2llqsvwwunf98v692nqd5juudcmmlu3zk55utx7xtfvznel030saclvq6
6. Click "Confirm"

**Where can I utilize sARCH?**

Solely by holding sARCH you are already generating staking rewards while having increased liquidity on your staked position, however in addition to holding the sARCH token you are able to utilize it across a wide variety of apps within Archway and the broader Cosmos to take full advantage of your liquid staking tokens. Here are a couple places you can utilize sARCH:

* [Make an OTC deal with sARCH on Peerswap](https://peerswap.net/)


