# Collectif DAO

Collectif DAO is a non-custodial liquid staking protocol on Filecoin

## Overview

The Collective DAO is a non-custodial liquid staking protocol built on top of the Filecoin network that lets users "stake" their FIL and receive clFIL (Collective Filecoin) in exchange. Staked FIL is distributed among storage providers who use the capital to expand their mining operations. Users can use clFIL in the DeFi ecosystem on both the Filecoin and Ethereum networks.

The price of clFIL is recalculated on every distribution of mining rewards on the Filecoin network. 25% of storage providers' rewards are available for withdrawal without any locking period, and these rewards are distributed among FIL stakers. The remaining 75% of rewards are distributed either from storage provider collateral (with instant access) or vested over 180 days, depending on how miners choose to interact with the protocol.

By staking FIL on the liquid staking protocol, users receive clFIL in exchange, which allows them to use their liquidity in the wider DeFi ecosystem. As the adoption and use of clFIL grows, more DeFi projects in the Filecoin ecosystem are likely to support the clFIL token, making it a fun and exciting way to participate in the Filecoin network.

## Quick links

{% content-ref url="/pages/RUdJxFO6AGNJ80LG2pNh" %}
[How to Stake FIL](/getting-started/how-to-stake-fil)
{% endcontent-ref %}

{% content-ref url="/pages/iwNldYsJ3iCYb06LtC6A" %}
[Introduction](/liquid-staking-protocol/introduction)
{% endcontent-ref %}

## Join our Community

If you want to follow our journey, here is where you can find us

{% embed url="<https://github.com/collective-dao>" %}


# How to Prepare Wallet

Here is a quick instruction for you to prepare your Metamask wallet and start staking your FIL on the Collectif protocol

### Install Metamask extension

To start working with the Hyperspace network or any Ethereum network you'll need a Metamask wallet. You can find the latest version of the extension on the official Metamask website [here](https://metamask.io/download/).

### Add Hyperspace network into your Metamask

After you set up your Metamask you'll need to add the Hyperspace Filecoin network. Please visit the Chainlist [website](https://chainlist.org/chain/3141). Connect your Metamask wallet, find a network with Chain ID 3141, and press the "Add to Metamask button".

<div align="left"><figure><img src="/files/CwnGxRhJCY2WViOIsGTW" alt=""><figcaption><p>Click the "Add to Metamask" button</p></figcaption></figure> <figure><img src="/files/GjbyigwjCIGy6y9dZQ04" alt=""><figcaption><p>Approve new network on your Metamask</p></figcaption></figure></div>

### Get some test tFIL tokens from the Hyperspace faucet

To execute any transaction, it's required to get some tFIL from the [faucet](https://hyperspace.yoga/#faucet). Copy your wallet address and click the "Send" button. It would take about 30-60 seconds for the faucet to give you 5 tFIL tokens.

<figure><img src="/files/TWmIlDGSd27hMn459iLy" alt=""><figcaption><p>Copy your wallet address and get some tFIL from Hyperspace faucet</p></figcaption></figure>

### Connect your wallet to Collectif DAO App

Once you have some tFIL on your wallet on the Hyperspace network you're free to stake on the Collectif DAO application. Please visit our [app](http://app.collectif.finance/) and connect your wallet.&#x20;

<div><figure><img src="/files/VjiyCU5sg7ItTqBLAp7I" alt=""><figcaption><p>Press "Connect Wallet" button</p></figcaption></figure> <figure><img src="/files/dJGobxieohuRMNk9DmjH" alt=""><figcaption></figcaption></figure></div>


# How to Stake FIL

You've prepared you MetaMask wallet and got some FIL to stake? Here is how you could stake FIL and get clFIL

{% embed url="<https://www.loom.com/share/3b72c1fc86fe4575be77e3e963049c9c>" %}
Collectif DAO Liquid Staking demo on Hyperspace network
{% endembed %}


# Introduction

Liquid staking aims to enhance the efficiency, security, and accessibility of the staking process. This can bolster staking participation, thereby fortifying the network's overall security and stability.

For Filecoin **Storage Providers** often struggling with capital access for pledges, liquid staking proves beneficial. Liquid staking reduces initial capital requirements and enhances capital efficiency for FIL pledges, potentially drawing more miners and expanding the Filecoin storage network.

For **Stakers** the Collectif protocol offers a native yield-bearing asset. Staking FIL mints Collectif Filecoins LST tokens (clFIL). This primary storage mining derivative token's price is determined by total accumulated mining fees.

Stakers can maximize returns as the Collectif DAO optimizes SPs' mining rewards by up to 40%. The clFIL token also serves as a hedge against high FIL circulating supply inflation.

Additionally, the Collectif liquid staking protocol mitigates staking risks, such as potential losses from network slashing due to SP misconduct. SPs are required to maintain collateral to cover possible slashing losses, ensuring FIL stakers are compensated for any SP misconduct.

### Problem Statement

Filecoin Storage Providers (SPs) have to post collateral (in FIL) to onboard storage capacity to the network and to accept storage deals. While important for security, the need to pledge collateral creates friction and an immediate barrier that limits SP participation.

Liquid staking assists SPs in meeting these pledge capital requirements. Previously, many SPs used under-collateralized loans from centralized entities, which required ownership of their primary miner accounts, presenting potential risks. Liquid staking offers a more decentralized, secure alternative.

## Implications for the Filecoin network

Currently, regional centralization resulting in uneven storage capacity distribution risks Filecoin's censorship resistance. Liquid staking can democratize mining, motivating Storage Providers in less represented regions to boost their network capacity. This leads to balanced storage capacity growth, enhancing the network's resilience.

Once the Collectif DAO's governance is fully decentralized, it aligns with Filecoin's decentralization mission. In the future, the DAO could guide sector allocations and deal-making for Storage Providers, promoting ethical behavior and network growth.

## Liquid Staking Components

* **Liquid Staking Pool**, which is the main contract that allows stakers to easily deposit their FIL and get yield out of the network storage mining, and Storage Providers to access this FIL for their sector pledges.
* A **Storage Providers Registry** is a database that maintains a record of all the Storage Providers on the network. This registry allows Liquid Staking Pool to interact with Storage Providers, and determine their risk profile and FIL allocation.
* A **Miner Collateral Module** is a system that allows Storage Providers to pledge collateral in order to participate in the staking process. The Miner collateral module can help to reduce the risks associated with staking, such as the risk of being penalized (or "slashed") for misbehaving on the network.
* A **clFIL/FIL AMM pool**, which is a system that allows users to easily exchange clFIL (the token used for staking on the Filecoin network) and FIL (the native token of the Filecoin network). This AMM (automated market maker) pool can help to ensure that there is sufficient liquidity for clFIL, which can make it easier for users to participate in the staking process.


# Benefits for FIL holders

## **Value proposition**

* **Efficient Staking**: With Collectif DAO, stake your capital with the most sophisticated Storage Providers in the Filecoin network, ensuring optimal operations and geographical diversity.
* **Maximized Efficiency**:: With Collectif DAO, Storage Providers can earn up to 40% more mining rewards, enabling stakers to significantly boost their yield.
* **Slashing Protection:** We require collateral coverage for slashing risks and preserving Filecoin's stability and security.

## **Benefit for FIL holders**

> Why should users stake their FIL with the Collective Liquid Staking protocol?

Liquid staking is integral to the Filecoin DeFi ecosystem. The consensus layer of the Filecoin network hinges on both storage capacity and pledge growth, making the network operate akin to a hybrid of proof-of-work (PoW) and proof-of-stake (PoS) systems.

Stakers contribute FIL capital to the liquid staking protocol, aiding storage providers in expanding their storage capacity without pledge requirement constraints. This not only helps secure the network but also fosters participation in Filecoin's consensus decentralization. As storage providers partake in Filecoin consensus, they allocate part of their total rewards to stakers, making clFIL a native yield-bearing asset in the Filecoin network.

For the decentralized, secure growth of Filecoin, the protocol must allocate as much FIL as possible to a broad spectrum of storage providers.

Compared to other products, staking FIL on the liquid staking protocol grants users clFIL in return, enabling them to utilize their liquidity within the wider DeFi ecosystem. As clFIL adoption and use grow, more Filecoin ecosystem DeFi projects are likely to support the clFIL token.


# Benefits for Storage Providers

## **Value proposition**

* **Maximized Profits**: Leverage our deep understanding of the Filecoin economy to boost your mining rewards by up to 40% and achieve profitability 50 days sooner per onboarded sector.
* **Predictable Profits**: With Collectif DAO's profit-sharing model, Storage Providers can predict their earnings, ensuring a consistent percentage of mining rewards despite market volatility.
* **Boost Your FIL Rewards:** By collateralizing their FIL, Storage Providers can access more FIL for pledges, maximizing their FIL-on-FIL rewards.

## Main Benefits for SPs

> Why Filecoin storage providers should use liquid staking to get access to FIL for pledges?

Liquid staking empowers storage providers to grow their storage capacity without concerning themselves with pledge requirements. This conserves resources, enabling a focus on enhancing their storage quality and reliability.

The Collectif DAO liquid staking protocol provides storage providers access to FIL capital with superior capital efficiency compared to other market solutions. The protocol's collateral requirements are limited to the risks associated with the total number of sectors supported by the storage provider.

Storage providers can access FIL capital on-demand, obtaining it on a daily basis. This saves them from paying interest on non-utilized FIL for pledges, compared to under-collateralized lending. SPs can adjust their FIL allocation at any moment based on their data center expansion plans.

A share of the rewards storage providers gain from participating in liquid staking is intended to be as capital efficient as possible. To make liquid staking appealing for both stakers and storage providers, the Collectif DAO governance is designed to respond to the fast-changing Filecoin mining market conditions.


# Slashing protection

## How does s**lashing work in Filecoin?**

Slashing is a mechanism that penalizes Storage Providers who fail to meet their storage commitments or behave maliciously. The penalties can vary from losing a portion of their stake (a "slash") to being completely removed from the network. Here's how it works in more detail:

### S**torage Fault Slashing**

Storage Fault Slashing happens when a miner doesn't meet their storage obligations. There are two main ways this can happen:

1. **Faulty sectors:** Miners in Filecoin are required to submit regular Proof of Spacetime (PoSt) to demonstrate that they're properly storing their assigned data. If a miner fails to submit their PoSt in a timely manner, the sectors they're responsible for are considered faulty. These sectors are subject to a *Sector Fault Fee* penalty, which is a loss of a portion of the miner's FIL (the native token of Filecoin) collateral.
2. **Sector termination:** If a miner wants to stop storing a sector before the agreed-upon time, they can choose to terminate it. However, early sector termination results in a penalty, which scales depending on how much time was left in the sector's deal.

#### Current network fault fees:

| Sector Fault Fee | Worth 3.5 days of rewards                                                                                                                                                               |
| ---------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Termination Fee  | <p>Depends on sector lifetime:</p><ul><li>Under 140 days: 20 days + half sector's lifetime worth of mining rewards.</li><li>140 days or more: equivalent to 90 days' rewards.</li></ul> |

*Note: Fault Fee depends on the exact slash date and future reward trends. A termination fee is based on the daily rewards at sector onboarding.*

<figure><img src="/files/3COMrd1rKFyOknTW0exR" alt=""><figcaption><p>Profile of total slashing fees depending on mining rewards trend</p></figcaption></figure>

**Consensus Fault Slashing**

Consensus Fault Slashing is designed to punish miners who try to undermine the network's consensus mechanism. There are three types of consensus faults: double-forging, parent grinding, and time-offset mining. Each of these faults results in the miner losing all their FIL collateral and being permanently expelled from the network. Here's a brief description of each type of consensus fault:

1. **Double-forging:** This fault occurs when a miner creates two blocks at the same height in the blockchain.
2. **Parent grinding:** This fault occurs when a miner tries to manipulate the blockchain's history to their advantage.
3. **Time-offset mining:** This fault occurs when a miner tries to manipulate the timestamp of their block to gain an advantage.

## Collateral  requirements example

<table><thead><tr><th>Name</th><th>Scenario</th><th data-hidden></th></tr></thead><tbody><tr><td>Total allocation</td><td>1,000,000 FIL</td><td></td></tr><tr><td>Daily sealing capacity</td><td>25,000 FIL</td><td></td></tr><tr><td>Commitment (days)</td><td>40 days sector onboarding</td><td></td></tr><tr><td>Collateral requirements (stable rewards)</td><td>30% (300,000 FIL)</td><td></td></tr><tr><td>Collateral requirements (increasing rewards)</td><td>35% (350,000 FIL)</td><td></td></tr><tr><td>Collateral requirements (decreasing rewards)</td><td>26% (260,000 FIL)</td><td></td></tr></tbody></table>

*Here is a simplified example of collateral requirements for a Storage Provider that looking to pledge about a million FIL*

## Slashing protection

Storage Providers (SPs) working with Collectif DAO need to maintain collateral to cover potential slashing losses, ensuring FIL stakers are compensated for SP misconduct. Slashing protection covers the following types of misconduct:

* Storage Faults
* Consensus Faults
* Missed rewards

This collateral, primarily in liquid FIL coins, is deposited by SPs into a dedicated smart contract. If an SP is slashed, the amount is drawn from this collateral to cover losses in the staking pool.

SPs must uphold sufficient collateral to pledge FIL capital from the pool to their miners. The collateral percentage is dynamic and can adjust over time. It accounts for the extreme scenario of an SP halting operations and incurring slashing for 42 consecutive days, leading to the automatic termination of all slashed sectors.

To ensure a sufficient safety net, the collateral percentage considers the average network and SPs' past slashing incidents. This provides a buffer to maintain a healthy state, even if a minor percentage of sectors are slashed for a short duration (up to 2 days).

### Rehypothecation of an existing initial pledge as collateral

The initial version of the Collectif protocol doesn't allow rehypothecation to avoid adding systemic risk to the Filecoin network. Although collateralization of the miner actor's initial pledge is seen in other staking protocols, we've opted to restrict this for now until we fully understand its potential impact on the Filecoin network's Quality-Adjusted Power (QAP) reduction. We're cautious about compromising Filecoin's consensus security, as it could endanger the entire ecosystem. Our team is committed to enhancing the network's resilience.

A significant concern is the potential decrease in data availability security. Specifically, if FIL+ sectors or sectors containing real data are rehypothecated, it considerably diminishes data security. This issue is critical as it undermines the primary value of Filecoin, which incentivizes maintaining data availability throughout the entire sector lifespan.


# Reward distribution

The Collectif Liquid Staking protocol operates on a profit-sharing model. In this system, Storage Providers (SPs) leverage the staked Filecoin (FIL) from the liquid staking pool as an initial pledge to onboard storage capacity on the Filecoin network. In return, they distribute a portion of their mining rewards to the pool.

The profit-sharing ratio is usually based on the risk profile of the SP and past performance. This ratio typically remains stable unless there are significant changes to the SP's profile or if the DAO makes the decision to adjust the ratio to maintain competitive staking rewards.

This profit-sharing model offers advantages over interest-rate-based protocols. It provides simpler financial management for SPs, particularly during market uncertainties. As Filecoin mining rewards have historically declined - a trend that accelerated after the Reward Baseline was crossed down in Feb 2023. SPs using interest-rate protocols or lending services face increased risk due to the potential significant fluctuations in expected rewards. Our model, in contrast, is designed to minimize such exposure.

**Current reward distribution scenario:**

| SP reward share | 60% |
| --------------- | --- |
| Stakers rewards | 40% |
| Admin fee       | 0%  |

*Note: Here is a simplified parameter for the initial launch of the Collectif Liquid Staking protocol and they're likely to change over time*

## Staking process

The Collectif DAO native liquid staking token is Collectif Filecoin (clFIL). Users generate these tokens by staking their Filecoin (FIL) to the liquid staking pool. When the pool has sufficient FIL capital, Storage Providers (SPs) can pledge it as an initial pledge on the Filecoin network to bring on more storage capacity.

SPs regularly repay a part of their mining rewards to the stakers in the liquid staking pool, usually on a daily basis. The clFIL token serves as a yield-bearing asset. Unlike stETH from Lido, it doesn't rebase, meaning clFIL holders shouldn't expect their clFIL balance to change.

In its initial version, the liquid staking protocol won't allow withdrawals of funds currently locked in active miners. The protocol aligns with the Filecoin network structure and won't force the termination of existing sectors. For early redemptions, the Collectif DAO team plans to launch an Automated Market Maker (AMM) market, enabling the exchange of clFIL back to FIL.

Currently, our team is researching the possibility of allowing withdrawals through a scheduled queue system. However, this research is still ongoing.


# SP Onboarding process

This document is intended for those Storage Providers who wish to participate in the Collectif DAO protocol and runs the mining operation in the Filecoin network.

## Onboarding steps

1. Contact Collectif DAO team ([email](mailto:bach@collectif.finance), [discord](https://discord.gg/BeeH6brcvf))
2. The Collectif DAO team would evaluate the historical performance of the miner actor
3. Determine the total allocation for a pledge and daily allocation depending on the sealing capacity
4. Integrate Collectif Go-lang SDK into your pipeline
5. Register your miner actor in the Collectif DAO protocol
6. Collateralize your FIL to the collateral system to cover slashing risks
7. Daily pledge FIL for your pledges and seal new sectors
8. Collectif DAO would distribute daily mining rewards after profit sharing

## Historical evaluation

Before onboarding Storage Provider our team conducts a risk assessment to evaluate the historical performance using on-chain data. Data points include but are not limited to:

* Historical Quality-Adjusted Power (QAP) and Raw Byte Power (RBP) trends
* Proportion of FIL+ data
* Slashing metrics and sector uptime
* Rewards history
* Changes in actor balances (initial pledge, locked rewards, available balance)
* Gas costs profile and sealing cost
* Historical FIL-on-FIL ratios

Those metrics are evaluated per miner and compared against the required standards of operational quality.

Moreover, we evaluate Storage Providers on their capital expenditure (CAPEX) and operational expenditure (OPEX) profiles, existing financing deals (either pledge deal or CAPEX loan from traditional finance), and financial pressure.

Beyond operational requirements, SPs are assessed based on the existing distribution of FIL in their geographical area as Collectif DAO aims to avoid over-concentration in specific regions.

In the event of unforeseen circumstances (e.g., natural disasters, internet outages, acts of war, or political instability), SPs are required to have relocation protocols in place to ensure operational reliability.

#### Several red flags disqualify onboarding:

* Imbalanced leverage, implying risky financial practices
* Insufficient financial buffer to withstand an 80% drop in FIL price
* Ambiguous hardware ownership due to third-party data center agreements
* Operation in regions with high uncertainty or instability
* High slashing rate and delays in sector recoveries
* Low data availability and slow data retrieval speeds
* Unpredictable QAP/RBP growth or reduction
* Non-enterprise setup and lack of data center certifications

## Storage Provider Monitoring

In order to maintain high operational standards, Storage Providers (SPs) are continually monitored on various metrics including on-chain activity, usage of FIL pledges from the liquid staking pool, sector uptimes, sealing capacity, and sealing costs. Through the use of the Collectif API, SPs can optimize rewards and are regularly evaluated on compliance with guidelines to maximize their mining yields.

Ongoing surveillance also serves as a safeguard in instances of slashing, sector recoveries, or terminations. When slashing is detected on the Filecoin network, the slashing amount is deducted from the SP's collateral to compensate for stakers losses. Furthermore, as sectors are bundled into partitions, a single slashed sector could prevent reward generation for over 2048 sectors, leading to missed rewards for stakers. In such scenarios, the SP is expected to compensate for these non-earned rewards.

Should an SP's operational quality decline, its total and daily allocations are adjusted to ensure the most efficient distribution of FIL from the liquid staking pool. This mechanism creates a strong incentive for SPs to maintain their operations in optimal condition.

Conversely, if an SP consistently improves its operational quality, total/daily allocations are increased. This system incentivizes excellence and ensures that non-performing SPs are not rewarded at the expense of those who are continually improving their operations.


# Stakers

<details>

<summary>What is liquid staking?</summary>

Liquid staking allows you to stake your cryptocurrency while retaining the ability to use or trade it. Through Collectif DAO, you can stake FIL and receive clFIL tokens that represent your staked assets, including the principal FIL amount and a share of mining rewards.

</details>

<details>

<summary>What is Collectif DAO?</summary>

Collectif DAO is a non-custodial liquid staking protocol built on the Filecoin network. It enables users to stake their FIL and receive clFIL (Collective Filecoin) tokens in return. Staked FIL is allocated to storage providers who use it to expand their mining operations, while clFIL can be utilized in the DeFi ecosystems of Filecoin and Ethereum.

</details>

<details>

<summary>How does Collectif DAO work?</summary>

To participate in Collectif DAO, users stake their FIL into the liquid staking pool and receive clFIL tokens representing their stake. The staked FIL is utilized by storage providers to onboard additional storage capacity. As storage providers mine new blocks, they share a portion of their rewards with stakers, generating yield over staked FIL. Mining rewards are withdrawn on a daily basis, which contributes to an increase in the clFIL-to-FIL price.

</details>

<details>

<summary>Why Collectif DAO?</summary>

* Collectif DAO works with the most sophisticated Storage Providers in the Filecoin network and has the highest requirements for operational performance.
* Slashing risks are covered by SP's collateral (only liquid FIL) which includes storage faults, consensus faults, and non-earned rewards. Making it much safer to stake on Collectif DAO when it comes to SP misconduct.
* Storage Providers earn up to 40% more by working with Collectif DAO which maximizes yield for stakers

</details>

<details>

<summary>How rewards are distributed between Stakers and Storage Providers?</summary>

Stakers receive 40% of mining rewards and Storage Providers receive 60% of rewards. There is no protocol fee

</details>

<details>

<summary>What is a clFIL token?</summary>

clFIL (Collectif Filecoin) is a liquid staking token that represents a yield-bearing asset on top of FIL. As storage providers generate mining rewards, the price of clFIL increases, enabling stakers to receive more FIL per clFIL token.

</details>

<details>

<summary>How can I get a clFIL token?</summary>

The simplest method to obtain clFIL tokens is by staking your FIL coins through our application. Once you stake your FIL into the liquid staking pool, you will receive clFIL tokens in return.

</details>

<details>

<summary>Has the protocol been audited?</summary>

Yes, the Collectif DAO codebase has been audited by Decurity. a reputable blockchain security firm. You can find our audit report [here](https://github.com/collective-dao/collectif-audits/blob/main/liquid-staking-protocol/Decurity%20-%20Collectif%20DAO%20Liquid%20Staking%20Protocol%20Audit.pdf).

We prioritize working exclusively with audited firms that have maintained a strong security track record and ZERO dollars lost.

</details>

<details>

<summary>How slashing is being protected?</summary>

Slashing protection is in place to safeguard against various types of misconduct within Collectif DAO, including storage faults, consensus faults, and missed rewards. Storage Providers (SPs) contribute collateral in FIL to a dedicated smart contract, which serves as a buffer to cover potential losses. If an SP is subject to slashing, the corresponding amount is drawn from this collateral to cover any losses incurred by the staking pool.

</details>


# Storage Providers

{% hint style="info" %}
This is a list of frequently asked questions from Storage Providers
{% endhint %}

<details>

<summary>How SP could be onboarded into Collectif DAO?</summary>

The onboarding process with Collectif DAO starts by filling out a form here. After finishing the form Collectif DAO team would contact SP, to discuss the requirements in detail. Once SP is agreed to participate in Collectif DAO, it could register on the smart contract by providing the total FIL allocation and Miner ID.

</details>

<details>

<summary>What are the minimal requirements for SP to become a part of Collectif DAO?</summary>

Before integrating an SP into Collectif DAO, we conduct an analysis of on-chain mining history to identify performance patterns over time. The analysis encompasses an evaluation of Quality-Adjusted Power (QAP) and Raw Byte Power (RBP) growth or decline (particularly in relation to the impact of certain Filecoin network upgrades), sector uptime, reward generation, and more.

Only SPs demonstrating long-term alignment with Filecoin's vision, adherence to security best practices, and solid historical performance are onboarded. Furthermore, it's a requirement for SPs to have an emergency relocation plan to tackle natural disasters or other unforeseeable incidents.

</details>

<details>

<summary>How mining rewards are distributed between SP and Collectif DAO?</summary>

Collectif DAO Liquid Staking protocol operates under the profit-sharing model with SP. At the moment it takes 40% of mining profits when the rewards are withdrawn from the Miner ID. The remaining 60% are distributed to the SP owner ID every time when Collectif DAO distributes mining rewards.

</details>

<details>

<summary>How much SP could ask for an allocation from Collectif DAO?</summary>

The total allocation required by SP could be the expected amount of FIL they will need to pledge to onboard their storage capacity. If SP plans got changed and they need to increase the allocation they can request the allocation update directly by interacting with the Liquid Staking protocol.

</details>

<details>

<summary>How this total allocation is distributed to SP’s miner actor?</summary>

Total allocation distribution is dependent on the total number of sectors expected to be pledged in the future and sealing capacity per day. Based on those numbers Collectif DAO determines the daily FIL allocation, which is distributed to the SP on a daily basis.

</details>

<details>

<summary><strong>Who takes losses when SP is slashed?</strong></summary>

As Filecoin network incentives are constructed to minimize the probability of data loss, it’s essential to follow the same directive, otherwise, the systemic risks get applied to the whole network. When pledging funds from the Collectif DAO Liquid Staking protocol SP has to provide collateral to cover the potential losses that might happen if there is a slashing event.

</details>

<details>

<summary><strong>What is the collateral in the Collectif DAO protocol?</strong></summary>

There are two main forms of collateral in the liquid staking protocol: external collateral in the form of FIL, and existing initial pledge from the owner ID.

* External collateral is deposited as FIL amounts to the collateral system smart contracts. Those smart contracts use the collateral once slashing happens in the Filecoin network, and deliver the slashing amount to the liquid staking pool. In case SP wants to remain in control of their Owner ID the only option for them is to use external collateral.
* The existing Initial pledge as a form of collateral is another form of collateral that require SP to share ownership of the Owner ID. The Owner ID control is required for the system to perform terminate/extend sector operations. This form of collateral is considered to be illiquid and requires the termination of existing sectors in order to cover the losses which happen in slashing. The existing initial pledge collateral is calculated as the amount of initial pledge that a particular Miner ID has under their account in the Filecoin network. This form of collateral helps SP to reduce the cost of collateral, meaning that they could get a bigger allocation by utilizing their existing funds.

</details>

<details>

<summary><strong>How Collectif DAO protocol uses collateral and why SP has to provide collateral?</strong></summary>

* SP collateral is used once the slashing event happens on the Filecoin network. Once slashing is identified on Filecoin, the slashing amount is transferred from the collateral contract to the liquid staking pool. It’s important to keep in mind that collateral delivery doesn’t reduce the total requirements to cover the pledges, and to pledge more FIL from liquid staking pool SP is expected to increase the collateral amount back.
* In a case with existing initial pledge collateral, the system requires the termination of some of the existing sectors to cover the losses in slashing. After those sectors terminated the released initial pledge funds are withdrawn from the Miner ID to the liquid staking pool to cover the losses.

</details>

<details>

<summary><strong>Does Collectif DAO control SP owner ID? How does it guarantee that capital from the liquid staking pool goes into Miner actor pledges?</strong></summary>

Collectif DAO doesn’t require taking control of SP’s owner ID. Instead, it works with a beneficiary address. This provides a guarantee that SP’s mining rewards would be distributed to the Liquid Staking pool, and any capital pledged from LSP goes directly to the miner actor pledges.

</details>

<details>

<summary><strong>How could SP connect to the Collectif DAO protocol to pledge the capital from the Liquid Staking pool?</strong></summary>

To automate the pledging process from the Liquid Staking pool SP could integrate an SDK into their existing pipelines with Lotus/Venus. This SDK allows SP to pledge capital from the pool either on a daily basis or on any new sector that is going to be sealed. At the moment daily capital delivery is used to reduce the total amount of gas fees SP would spend by working with Collectif DAO.

</details>

<details>

<summary><strong>Who pays for the gas fees when interacting with Liquid Staking pool?</strong></summary>

Generally, the gas fees associated with the sector's lifetime are paid by the SP. Liquid Staking pool covers the PreCommit Deposit, Initial Pledge, and additional requirements (like x10 initial pledge for FIL+ sectors). When SP pledges the capital from the Liquid Staking pool gas transactional gas costs are paid by them. When it comes to rewards distribution Collectif DAO covers transaction costs by withdrawing mining rewards on a daily basis.

</details>


# Multivaults

This page is under development, it’s likely to be changed over-time


# Go-lang SDK

Collectif-Go-SDK is the main client for Filecoin Storage Providers to interact with Collective Liquid Staking protocol it wraps around all the complexities of joining Collectif protocol, pledging capital from the liquid staking pool into miner's Initial Pledge, and managing SPs collateral.

Right now the most popular clients in the Filecoin network are Lotus which is developed and maintained by Protocol Labs, Venus developed by IPFS Force, and Forest. We’re likely to start developing a Rust version to support Forest client implementation.

### Installation

Install the package into your Lotus/Venus nodes using go mod:

`go get github.com/collective-dao/collectif-go-sdk`

### Build from source

After installing an SDK please make sure you build by running `make all`

### Using via CLI

The command line interface provides most of the functions of the SDK for Storage Providers to simplify the interactions with the Collectif DAO protocol on FVM.

The main functionality includes but is not limited to&#x20;

* Registration on Collectif DAO
* Changing beneficiaries for Staking Pool
* Collateral management
* Pledging from Liquid Staking pool
* Filecoin Wallet management


# CLI commands

## Collectif Go SDK

{% code overflow="wrap" %}

```
Collective-Go-SDK is the main client for Filecoin Storage Providers to interact with Collective Liquid Staking protocol it wraps around all the complexities of joining Collectif protocol, pledging capital from the liquid staking pool into miner's Initial Pledge, and managing SPs collateral.

Usage: collectif-go-sdk [command]

Available Commands: 
    change-beneficiary     Change beneficiary address in the Collectif DAO protocol
    collateral     This is the section for interacting with the StorageProviderCollateral contract
    completion     Generate the autocompletion script for the specified shell 
    help     Help about any command register Register Storage Provider in the Collectif DAO protocol 
    staking     Interact with Liquid Staking contract to pledge FIL 
    wallet     Interact with Filecoin/Ethereum wallet

Flags: -h, --help help for collective-go-sdk

Use "collectif-go-sdk [command] --help" for more information about a command.
```

{% endcode %}

## Register on Collectif DAO

```
Register Storage Provider in the Collectif DAO protocol

Usage:
  collective-go-sdk register [flags]

Flags:
  -h, --help             help for register
  -l, --limit int        FIL allocation for pledge
  -m, --miner string     Storage Provider miner address (Filecoin address)
  -p, --period int       Max epoch for pledge operations
  -r, --run              Execute transaction (default true)
  -s, --staking string   Liquid Staking pool address (Ethereum address)
```

## Collateral Management

```
This is the section for interacting with the StorageProviderCollateral contract

Usage:
  collective-go-sdk collateral [flags]
  collective-go-sdk collateral [command]

Available Commands:
  deposit        Deposit collateral into StorageProviderCollateral contract
  get-collateral Returns available and locked collateral amounts for Storage Provider
  withdraw       Withdraw collateral from the StorageProviderCollateral contract

Flags:
  -h, --help   help for collateral

Use "collectif-go-sdk collateral [command] --help" for more information about a command.
```

## FIL Pledging from Liquid Staking pool

```
Interact with Liquid Staking contract to pledge FIL

Usage:
  collective-go-sdk staking [flags]
  collective-go-sdk staking [command]

Available Commands:
  pledge           Pledge sector to finalize sealing and increase initial pledge for Storage Provider
  withdraw-balance Withdraw balance from the Miner actor

Flags:
  -h, --help   help for staking

Use "collectif-go-sdk staking [command] --help" for more information about a command.
```

## Change Beneficiary

```
Change beneficiary address in the Collectif DAO protocol

Usage:
  collective-go-sdk change-beneficiary [flags]

Flags:
  -h, --help             help for change-beneficiary
  -s, --staking string   Liquid Staking pool address (Ethereum address)
```

## Filecoin wallet management

```
Interact with Filecoin/Ethereum wallet

Usage:
  collectif-go-sdk wallet [flags]
  collectif-go-sdk wallet [command]

Available Commands:
  export      Export Filecoin wallet from SDK
  get-default Get default wallet used by SDK
  import      Import Filecoin wallet for SDK
  list        List wallets used by SDK
  new-wallet  Create a new wallet for Collectif SDK
  set-default Set default wallet for SDK

Flags:
  -h, --help   help for wallet
```


