Projects Mentioned: Filecoin, GLIF, STFIL, Collectif, Web3Mine, Stacks

TLDR:

  • The programmable layer on FIL, the FVM, allows for trustless marketplaces to be built
  • This calls for a need for a marketplace that currently exists off-chain, i.e. FIL borrowing to be brought on-chain, where FIL token holders lease their FIL to Storage Providers (which some call “miners”) who borrow FIL from the pool(s)
  • FIL borrowing is essentially taking cash forward on the future block rewards accrued by the Storage Providers, and this makes FIL block rewards from data storage more capital-efficient
  • There are obvious trade-offs to be made between centralization-capital efficiency- and security in protocol design
  • The market size for borrowing FIL is reducing over time but the introduction of stablecoins, etc. Can unlock unique projects to be built on top of these protocols

The launch of a programmability layer on a seasoned blockchain generally comes with a lot of excitement. The launch of Stacks (STX) on the Bitcoin blockchain brought a new paradigm of thinking amongst the community built around it.

A very similar narrative happened with the launch of the FVM on Filecoin. The robust Filecoin community now has to see its vision through a completely different lens. A lot of open problems that the ecosystem had could now be addressed. Creating trustless marketplaces via programmability was a key piece of the puzzle.

Liquid staking on Filecoin was the first “Request-for-build” from the Filecoin ecosystem during the launch of FVM and was given high importance. To understand why this is, let us first understand how the economics of Filecoin work.

How Filecoin Incentives Work

Unlike an Ethereum validator, there is no one-time staking in Filecoin. Every time a Storage Provider (SP) provides services, they need to put up a pledge amount in FIL. This pledge is required to seal the sectors and store the sealed sector in the SP. Such a structure ensures that the SP is going to store data for their clients for the period of the deal that they agree to, in exchange for rewards. Rewards are distributed via PoSt (Proof of Space-Time), where the SPs are rewarded for proving that they have the right client data stored.

SPs are selected via a leader selection mechanism called DRAND. DRAND chooses the leader with some initial requirements and also the % of raw byte power of the network controlled by the SPs.

SPs will have to keep ramping up raw byte power (RBP) to be chosen as the leader to “mine” a block and receive incentives. This helps the SP subsidize their storage costs.

Although there are many more factors that govern the supply rate of these incentives, the baseline is that for storage providers/miners, to maximize their bottom line will have to try to maximize RBP and onboard (and renew) more deals.

This creates a positive loop for the Filecoin network

Economics of a Storage Provider

When an SP receives block rewards, these rewards are not liquid. Only 25% of the rewards are liquid, and the remaining 75% of the block rewards vest linearly over 180 days (~ 6 months). This poses a problem for SPs. The rewards, which are supposed to be an SP’s operating income, are now delayed payments for as long as the SP onboards/renews deals.

Let us look at the SP balance of the top miner in the network (as of 6th August 2023)

Storage Provider Account Balance Change, Source: FilFox

When you look at the graph, one can see that only about 1% of the rewards (or operating income) of the SP is actually liquid. If this SP now wants to either:

  • Pay for operating income
  • Upgrade hardware
  • Pay for maintenance
  • Or onboard/ renew deals

The SP will have to either borrow fiat currency or borrow FIL from third parties just to make up for these “delayed” payments.

At the moment many storage providers (miners) in the network rely on CeFi lenders such as DARMA CapitalCoinlist, and a few others. As these are loan products, storage providers will have to go through KYC and a strict audit process to be able to borrow FIL.
When we look at the map below, we can see a very high concentration of Filecoin SPs in Asia, and with centralized providers being mostly in the West, it is very hard for them to underwrite FIL loans to Asian miners with favorable terms, and most Asian miners/ SPs don’t have access to such providers.

Source: Observable Dashboard by @jimpick

This becomes a hindrance for new SPs to come in and participate in the system, and existing SPs can scale their business only as much as the total FIL pool size of these CeFi lenders

So why not just borrow fiat currency from a bank? With FIL being a volatile asset, it will pose additional capital management challenges for SPs who borrow.

To solve this problem, there needs to be a marketplace for FIL lenders (who could be holders of FIL) and FIL borrowers (SPs)

Filecoin Staking

With the launch of the FVM, this marketplace idea can come to fruition. FIL lenders/stakers can now put their FIL to work and SPs can borrow from this pool (either in a permissioned or permissionless manner) all governed by smart contracts.

There are many players in the ecosystem who are already building this and waiting to launch in the coming months.

More than calling such marketplaces staking protocols, it is a lot closer to a lending protocol by the nature of this business.

Some base features of such a FIL lending product would be:

  • Lenders deposit idle FIL and receive a “liquid staking” token
  • Borrowers (SPs) can borrow from the pool against collateral that exists in the SP actor (Essentially Initial Pledge + Locked Rewards)
  • Borrowers will make interest payments every week, or any specified time period, by signing over the “OwnerID” of the SP to a smart contract
  • Lenders receive the interest (minus protocol fees) as APY either via a rebase token or a value accrual token

Existing players in the system include:

Source: Starboard Leaderboard

Different liquid staking protocols have different schools of thought when it comes to borrowing:

Over/ Fully collateralized vs. Undercollateralized

In Over-collateralized or fully collateralized models, the debt-to-equity ratio is always going to be less than or equal to 100%. This means that if my SP balance is say 1000 FIL, I can only borrow up to 1000 FIL (depending on the protocol rules as well). This can easily be coded into smart contracts and default risk is built in. This allows for greater transparency and also security to the stakers (lenders). Another advantage of such a model is that it allows for permissionless borrowing as well. This is where the product blocks more like Aave/ Compound rather than a Lido or RocketPool.

In an uncollateralized model, the lenders are bearing risk while the risk is being managed by the protocol. In such a model, risk modeling is complex math that cannot be baked into smart contracts, and needs to be off-chain which sacrifices transparency. But, since there is leverage involved, it makes the system a lot more capital-efficient for the borrower. The more permissionless a leveraged system will get, the more risk the lenders bear and this would call for a very robust and dynamic risk management model that is run by the protocol developers

The trade-offs being made are:

  • Capital efficiency vs. staker risk
  • Capital efficiency vs. transparency
  • Lender risk vs. borrower entry to the system

Single Pool vs Multi-Pool

Protocols can also opt to build a multi-pool model where lenders can choose to stake FIL in different pools with different risk parameters. This allows for risk to be managed on-chain, but liquidity will be fragmented. In a single-pool model, risk will have to be maintained off-chain. Overall the trade-offs will still remain the same as the ones mentioned above.

Trade-off: Liquidity fragmentation vs Risk management transparency

Risks

In an overcollateralized model, even if the miner gets slashed multiple times, as soon as the Debt-to-equity ratio hits 100% the miner will get liquidated and the stakers will be comparatively safe

In an undercollateralized model, the borrowers can be penalized for failing to prove sectors. There are many more faults in failing to prove data storage rather faults in the consensus itself. This is more common in Filecoin than in other general-purpose blockchains because there is an actual commodity that is being stored from an off-chain entity. This will affect the collateral value and lever the borrower more. Liquidation thresholds will have to be set very carefully in such a model.

Filecoin Miner Penalties (90 days). Source: Starboard

Comparison of Key Market Players

What about Ethereum Staking/Lending protocols entering the market?

In the Filecoin ecosystem, unlike the Ethereum ecosystem, the nodes (Miners/Validators/SPs) are responsible for much more than general uptime. They are supposed to market themselves to be chosen as SPs, and regularly upgrade their hardware to support more storage, seal, store, maintain, and retrieve data. Filecoin storage and reward mining for SPs is a full-time job.

Unlike an Ethereum validator, there is no one-time staking in Filecoin. Every time an SP provides storage to a client, they need to put up a pledge. This pledge is required to seal the sectors and store the sealed sector in the SP. Storage provision on Filecoin is a very capital-intensive process and this discourages many new SPs from participating in the network and existing SPs from staying and contributing to the network.

Since the participants on the borrow side are SPs only it is also going to be intensive for newcomers in the Filecoin ecosystem to bootstrap borrower trust.

The mechanics of Filecoin alone don’t allow Ethereum staking or even lending protocols to deploy easily on the FVM.

Economics of the Protocol

Is there enough FIL in the market to supply for lending?

As of August 6th, 2023, there are about 264.2 million FIL circulating that are not committed as sector pledges or rewards that are to be released. This can be counted as the total amount of FIL that can be staked by the lenders into the pool

Source: FilScan

Is there enough demand for borrowing?

While FIL borrowing is essential to SPs, what are they actually borrowing? They are taking a forward payment on their locked-up rewards in an overcollateralized model, and in the undercollateralized model, they are taking a forward payment on future rewards.

Looking at the graphs above, we can see that the total locked rewards are about 223M FIL, and the supply can match the demand. The demand-to-supply ratio is almost 84%. This shows even power dynamics on either side, and either side cannot squeeze the other on interest rates/ APY.

What does the future look like?

Estimating the market for future demand of FIL for borrowing is essentially the amount of FIL that will be released in the future as rewards.

The good folks at Messari ran a simulation of FIL circulating supply with a 3-year and a 50-year forecast using different cases.

Source: Messari

According to the top left graph, considering a conservative scenario where there is low onboarding of data and only 10% of the total deals are renewed, the new reward emissions over 3 years are close to around 100M FIL and in an aggressive scenario where there is a high amount of data onboarding and 70% of existing deals renewed, the extra rewards come to about 200M FIL

So one can expect a market size of somewhere between 100M — 200M FIL over the next 3 years. At the current price of FIL (Aug 6th), which is $4.16, there could be a borrowing TAM of about $400M — $800M. This could be counted as the TAM of the product’s borrow side.

On the supply side, in the conservative estimate, there can be about 300M FIL that will be emitted, and in a more aggressive scenario, the circulating supply is simulated to be around the same as it is today. Why? It is because if more deals are being onboarded and renewed, there will be a lot more FIL locked-in sector pledges.

In the more aggressive scenario, the demand is going to outweigh the supply and the interest charged can be higher in this competitive market.

Where I think this can go

Amongst the different designs, there need not be a winner-takes-all type of model. Intuitively, the long-term winner (by TVL) is generally the protocol that is built most safely. Very much like Lido in the Ethereum ecosystem. I for one am biased towards safer structures more than optimizing for 2–3% more yield, and I think FIL whales would also prioritize capital safety over a slightly higher yield.

This is after considering the amount of penalties miners pay for not being able to prove space-time.

From the borrower (SP) end, the SP could borrow from different protocols for different purposes. If the SP already has a lot of collateral and doesn’t need to lever up to pay for opex, then the safer, overcollateralized model will work better, since it is safer. Whereas if I am a newer SP with a lot of sectors to be pledged I would borrow with leverage from an undercollateralized pool.

After studying the above models, we can see:

Staking in Filecoin is important to bridge the supply and demand for FIL in the ecosystem. The FVM has recently been released allowing for a lending marketplace to exist. Although the problem is real, the FVM release was probably too late for most FIL staking/lending protocols as the pie (mining rewards) is decreasing over time making it a niche market.

However, a few fascinating use cases can emerge on top of these staking protocols. With the introduction of stablecoins, the rewards can be taken as cash forwards. Something similar to what Alkimiya is building on Ethereum. This can result in the injection of new capital into the Filecoin ecosystem and also increase the TVL in these protocols.

Ethereum’s and Filecoin’s tech is different, their miners are different, their developers are different, their apps are different, and hence their communities. And for staking in particular, with every miner being “non-fungible” bootstrapping the demand side becomes a BD exercise and the success of it is directly proportional to the protocol’s reputation in the community.

Filecoin staking is a critical solution that needs to be built to get more SPs in the system, for retail to put their capital to work, create greater economic incentives as an ecosystem to attract more developers, and build useful products to build a positive flywheel. To know more beyond staking in the Filecoin ecosystem and the criticality of the FVM you can read this previous piece we published.

There are many more open problems to be solved in the Filecoin ecosystem, but we are positive that the Filecoin Ecosystem is working in the right direction to achieve its vision of storing humanity’s data in an efficient system.

🇨🇳Filecoin质押经济学

Unlike proof-of-stake cryptocurrency protocols that directly provide rewards for locking staked tokens, “staking” FIL is much more akin to a lease.

You may have heard of services or applications that enable “Filecoin staking.” However, “staking” on the Filecoin network is different from proof-of-stake cryptocurrency protocols like Ethereum. Filecoin “staking” allows storage providers (SPs) to borrow FIL which they use as collateral to provide storage on the Filecoin network.

Unlike proof-of-stake cryptocurrency protocols that directly provide rewards for locking staked tokens, “staking” FIL is much more akin to a lease. SPs borrow FIL to use as collateral and may pay a fee. Applications facilitating this may also take a fee.

You can think of a FIL lease to a storage provider like a car being leased to an Uber driver who makes money providing rides through the Uber platform. During the lease term, the car owner receives lease payments from the Uber driver; when the lease is over, the car is returned to the owner.

Why do storage providers need FIL collateral?

Filecoin storage providers (SPs) contribute data storage capacity to the Filecoin network.

In order to ensure that files are stored reliably over time, SPs are required to post FIL as collateral. If an SP fails to meet their responsibilities (perhaps they go offline or stop storing certain files) their collateral is slashed, meaning that they lose a portion of the FIL they posted as collateral.

A storage provider can buy or earn FIL to provide the collateral they need to run their data storage business, or they might borrow/lease FIL from existing token holders.

Centralized vs decentralized applications

Third-party centralized programs enable storage providers to borrow FIL to use as collateral. In the centralized model, token holders transfer custody of their FIL to centralized intermediaries for set periods of time. These intermediaries allow SPs to borrow FIL, and distribute fees collected to token holders.

This model requires that token holders trust the centralized intermediary with custody of their FIL. Some centralized programs rely on multi-sig transactions. Multi-sig is short for ‘multi-signature’, which means a transaction has two, or more, signatures before it is executed. However, multi-sigs still rely on human intervention.

In contrast to this centralized model, there are also numerous decentralized third-party applications that utilize smart contracts to enable SPs to borrow FIL to post as collateral.

Risk

Using any third-party application carries risks, and it is critical to thoroughly research any application to understand all these risks. Some areas to consider are:

  • Audits: Has a third-party audited the code and are the results published publicly?
  • Open Source: Is the code available to inspect publicly?
  • Bug Bounty: Does the program provide a bug bounty to incentivize anyone to report/fix possible vulnerabilities?
  • Trustless: Can you use the application without relying on an intermediary; is there a single point of failure?

More information on risk is available here.

Disclaimer: This information is for informational purposes only and does not constitute investment, financial, legal, or other advice. This information is not an endorsement, offer, or recommendation to use any particular service, product, or application.

This guide outlines how to transfer FIL from your Ledger wallet to your MetaMask wallet, and how to use Ledger to secure your Metamask wallet for the FVM.

Transfer FIL From Ledger to Metamask

To access dApps on the Filecoin Virtual Machine (FVM), you need FIL in a 0x/f410 wallet address. However, Ledger Live has not yet been updated to support the direct transfer of FIL to 0x/f410 addresses. To move FIL from a Ledger wallet to Metamask follow the steps below:

  1. Log in to Metamask and Switch from the [Ethereum — Mainnet] to the [Filecoin — Mainnet]. Copy your 0x address.
  1. Open Ledger Live. Click [Send] and select your Filecoin account to debit. Then paste your Metamask 0x address. As you can see, Ledger Live does not yet support 0x addresses for FIL. It displays an error that reads, “This is not a valid address.”
  1. You can use Glif.io to send FIL from your Ledger directly to Metamask (0x). Visit Glif.io and click [Connect Wallet].
  1. Connect your Ledger device via USB and select Ledger [Filecoin]. Make sure you have closed Ledger Live to avoid device access conflicts.

5. Allow glif.io to connect with your device.

  1. Your Ledger wallet and FIL balance should now be displayed. Click [Send FIL] to transfer from your Ledger to Metamask.

7. Paste your Metamask (0x) address into the recipient field. Glif.io recognizes this 0x address as a valid FIL wallet address and also shows the corresponding f410 address.

  1. Click [Send] and approve the transaction on your Ledger device. Your funds should be available in Metamask after around two minutes. You can check that your funds have arrived by searching for the destination address in a block explorer like Filfox.


Use Metamask with a Ledger on the FVM

Metamask has support for Ledger wallets, meaning you can hold funds on a Ledger device to use with the FVM. Note that to use the FVM, we will need to use 0x/f4 addresses. To configure use your Ledger with Metamask, you will need to do the following:

  1. Ensure Metamask is connected to the Filecoin Network

  2. Connect your Ledger device to the Ethereum network and connect it to Metamask. Copy the 0x address you see here.
    Note: This is counterintuitive but has to do with how signatures are generated. The address that will show up in your Metamask wallet (when connected to the Filecoin Network) while your Ledger device (with the Ethereum app open) is connected will be able to send transactions on the FVM. There is a PR to get f4/0x support in the Filecoin Ledger app for the FVM, which when merged will mean one will only need to use the Filecoin app on their Ledger device.

  3. You can now follow the rest of the instructions described above starting with Step 3 of the previous section. Note you will need to switch back from the Ethereum app on your Ledger to the Filecoin app to initiate the transfer in Step 4 of the previous section.

  4. Once the funds have been sent to the 0x address (copied in Step 2 of this section), you will be able to to initiate transactions via Metamask and sign transactions using the Ethereum app on your Ledger.

In order to access dApps on the Filecoin Virtual Machine (FVM), you need to have FIL in a 0x/f410 wallet address. However, several popular exchanges have not yet been updated to support the direct transfer of FIL to a 0x/f410 address.

If you need to move FIL from an exchange that does not yet support 0x/f410 addresses follow the steps below. These steps will show you how to use a GLIF burner wallet to facilitate the transfer.

  1. Log into your Coinbase account. Ensure you have some FIL. Then click [Send & Receive] in the upper right-hand corner.

 

 

  1. Once you have selected the Filecoin asset to send in Coinbase open your Metamask wallet. Switch from the [Ethereum — Mainnet] to the [Filecoin — Mainnet] in Metamask and copy your 0x address.

 

 

3. If you enter your Metamask 0x address directly into Coinbase you will see an error. This is because Coinbase has not yet upgraded to support sending FIL to 0x/f410 addresses. You will need to send your FIL from Coinbase to an intermediary wallet that supports all FIL address types. In this example, we will use a GLIF.io burner wallet.

 

 

  1. To get your recipient address visit glif.io click [Connect Wallet] and create a [Burner Wallet]

 

 

  1. A random seed phrase will be created. You can use this seed phrase to recover this burner wallet in the future if you need to. Click [Create seed phrase] to open your new burner wallet.

 

 

6. When your GLIF wallet is created it should have an f1 address like this (eg. f1fnqqhhor2y4metvokp22kdtnl7qbg6rso7kqp7a) Copy this address and enter it as your Coinbase recipient.

 

 

7. Coinbase should no longer show an error when you send your FIL to your GLIF f1 wallet address.

 

 

8. Once the transaction is complete and the FIL is visible in your GLIF wallet open Metamask and copy your 0x address.

 

 

  1. Return to your GLIF burner wallet and select [Send FIL]. Paste your Metamask 0x address as the recipient. Send your total FIL balance from your GLIF wallet to Metamask — why would you want to keep FIL in a burner wallet?

 

 

10. Once the transaction is complete you should have your FIL balance in your Metamask 0x address and ready to use on any number of FVM dApps.

 

 

In the future, Coinbase may join other exchanges in allowing FIL to be sent directly to a 0x address so these steps will no longer be necessary.

How to transfer from a Metamask wallet (0x) to a Coinbase (f1) account

To reverse the process described above and send FIL from an Ethereum-based wallet like Metamask to an f1 address follow the steps below.

  1. If you attempt to transfer FIL from a Metamask 0x account to any f1 wallet you will get the following error: Not ETH network, set to lowercase.
    This error is because Ethereum-based wallets do not natively recognize the f1 address formats.

 

 

2. To transfer your FIL from an 0x Ethereum-based wallet like Metamask to an f1 address use the GLIF FILForwarder. Visit glif.io and connect your Metamask wallet.

 

 

  1. Once your wallet is connected click [Send/Forward FIL]

 

 

4. Paste your Coinbase address (f1) in the [Recipient] field and enter the amount of FIL you want to send. Make sure you leave a small amount of FIL on your Metamask wallet to pay the gas fee.

 

 

5. Your funds should be available at the destination after around two minutes. You can check that your funds have arrived by searching for the destination address in a block explorer.