USDepin//USDfil

1-to-1, yield-bearing, USD stablecoin, backed by FIL and deployed on FVM

Introduction

USDfil is the native stablecoin of the USDepin protocol on Filecoin - it is described in this document. USDepin is a multichain protocol for stablecoins, backed by physical hardware assets and DeFi. Its mission is to enable stable, permissionless transactions supported by decentralized physical infrastructure (DePIN).

Protocol Description

USDfil is the Filecoin-native stablecoin pegged to the US Dollar (USD). It is a synthetic dollar supported by Filecoin’s Proof of Storage and by Filecoin futures contracts, which, combined, maintain a stable dollar value. The underpinning physical infrastructure consists of hard disks performing Proof of Useful Work and storing data on Filecoin. USDfil is governed by smart contracts operating on the Filecoin Virtual Machine (FVM) on the Filecoin L1.

The USDfil protocol contains the following components:

  1. A set of smart contracts deployed on the Filecoin Virtual Machine (FVM) that are the core logic of the USDfil.

  2. The $USDfil token, an ERC20 token that is the native synthetic stablecoin pegged to the USD.

  3. The $rFIL token which is a receipt token used to redeem $USDfil for FIL. It is an ERC20 token that can be exchanged for $FIL 1-to-1. The purpose of this token is discussed further in the withdrawals description.

USDfil Smart Contracts

The USDfil protocol consists of a suite of smart contracts that create a synthetic USD. The main smart contract that users interact with is USDFILMinter. This smart contract accepts deposits from the user in a particular currency and returns tokens in a corresponding token. Table 1 shows the correspondence for each possible deposit type.

Table 1: Return token types for each type of deposit.

The smart contract manages the deposits so that the total amount of USDfil in circulation at any time (the circulating supply of USDfil) equals the total value locked (TVL) of the smart contract. The Minting and Redemption sections describe this process in more detail.

USDfil Token

The USDfil token is an ERC20 token that represents the dollar value of the FIL deposit. Users can get this token by depositing FIL into the Minter smart contract. The minted amount is determined by the USD/FIL exchange rate at the time of deposit. The protocol does not charge fees when converting FIL to USDfil.

rFIL Token

The rFIL token (receipt FIL) is an ERC20 token that is 1-to-1 exchangeable with a FIL token. The smart contract mints rFIL tokens when the user deposits USDfil. The amount is determined by the USD/FIL exchange rate at the time of deposit. rFIL tokens can then be exchanged for FIL, 1-to-1.

Protocol Mechanisms

Minting

The protocol executes the following steps when FIL is deposited:

  1. Hold the FIL deposit in a temporary buffer.

  2. Create a delta-neutral hedged position using a buffer of FIL held by the protocol to maintain liquidity. Specifically, half of the value of the deposited FIL is held on the Filecoin blockchain, in some (optionally) yield-bearing instrument (such as GLIF), while the other half is used to create a short position on a centralized exchange (CEX). The short position does not use leverage to minimize risk.

  3. If the hedged position is successfully created, the protocol will then accept the FIL deposited by the user to replenish its internal buffer, mint the user the commensurate amount of USDfil, and update the protocol chain state to reflect a successful FIL deposit. The amount minted is equal to to avg_fill_price * FILDeposited, where the avg_fill_price is the average price at which the short position was opened on the CEX.

  4. If the hedged position does not get created successfully for any reason, the user is refunded their deposit after a timeout. Essentially, the protocol is required to open a hedged position for the amount deposited by the user within a configurable amount of time (~1 hour). If this doesn't happen, the funds are returned to the user, and returning funds can be triggered by any party through a smart contract write operation. Note that while the timeout is initially configured for 1 hour, deposits are expected to be hedged within 30 seconds of a deposit.

In the future, the protocol will add additional confidence boosting measures by utilizing an on-chain oracle and ensuring that the amount of USDfil minted is within a certain tolerance of the amount that would have been, had the hedging happened immediately when the user deposit and according to the price displayed by the oracle.

Withdrawals

The protocol executes the following steps when USDfil is deposited (i.e. a withdrawal request):

  1. Hold the USDfil deposit in a temporary buffer.

  2. Close the delta-neutral position for the amount of USDfil that was deposited. This specifically involves closing the short position on the CEX and moving that amount of FIL back to the USDFILMinter smart contract, and withdrawing a commensurate amount from the on-chain instrument and moving it back to the USDFILMinter smart contract.

  3. If the hedge is successfully closed, the protocol will then accept and burn the USDfil that was deposited, and mint to the user a commensurate amount of rFIL, and update the protocol chain state to reflect a successful USDfil deposit. The amount minted is equal to USDFILDeposited / avg_fill_price, where the avg_fill_price is the average price at which the short position was closed on the CEX.

  4. If the hedged position does not get created successfully for any reason, the user is refunded their deposit after a timeout. This works exactly the same as in the minting case.

In the future, the protocol will add additional confidence boosting measures by utilizing an on-chain oracle and ensuring that the amount of USDfil minted is within a certain tolerance of the amount that would have been, had the hedging happened immediately when the user deposit and according to the price displayed by the oracle.

Exchanging rFIL for FIL

rFIL is the protocol's receipt token used to facilitate redemption. It can be exchanged for FIL, 1:1. FIL will be made available to withdraw after the closing of the delta-neutral position described in Step 2 of Withdrawals reaches finality. The consensus mechanism of the Filecoin chain therefore necessiates a delay between acquiring rFIL and exchanging it for FIL. This is, in fact, the primary reason why the rFIL mechanism is in place. To mitigate this, the protocol maintains a liquidity buffer of FIL on the USDFILMinter smart contract to enable it to process rFIL<>FIL exchange instantaneously. However, if the protocol experiences a large amount of withdrawals in a short amount of time, then the liquidity buffer will be replenished more slowly, resulting in a delay for additional rFIL<>FIL exchange until the buffer is replenished.

With the advent of Filecoin Fast Finality, we expect this delay in withdrawal from rFIL to FIL to be drastically reduced.

Decentralization

  • USDfil employs a hybrid approach combining on-chain spot transactions with off-chain futures contracts.

  • The protocol is dedicated to transitioning to DEX futures as liquidity and execution capabilities for fully on-chain synthetic dollar protocols enhance.

  • Both USDfil and USDepin are committed to supporting Proof of Useful Work, aligning with the principles of the DePIN movement.

Protocol Yield

The protocol generates yield from three sources: basis management, futures funding rates, and protocol redemption fees, all of which contribute to an insurance fund that whose reservers will be attested to chain.

  • Basis collection: The protocol's hedging execution engine captures basis reversion upon the initiation of futures contracts, contributing funds to the insurance fund.

  • Futures funding rates: Funding rates collected from futures contracts typically yield an annual percentage rate (APR) of 5-30%, also benefiting the insurance fund.

  • Protocol redemption fees. The protocol applies a static fee of 0.1 FIL, and a dynamic fee of 0.1% of the withdrawal amount when exchanging rFIL for FIL. This fee is used to fund protocol operations such as rebalancing.

  • User yield. The protocol plans to switch on user yield in Q4 2024. The historical protocol yield for the past 1 year (to August 2024) has averaged 15.08%:

Risks

Due to the unique mechanics of the USDfil protocol, the following risks are identified:

  • Collateralization. The protocol operates without leverage, and the USDfil token is fully collateralized, ensuring 1-to-1 backing.

  • Basis Risk. The protocol’s hedging algorithm actively manages future and spot dislocation to its advantage.

  • Sustained negative funding rates: The futures funding rate by design exhibits mean-reverision property for the delta between futures and spot prices. The current USDfil design tolerates sustained average negative short funding rates of -8%. Historically funding rates sit between approximately positive 10-30%.

  • Exchange Risk. This risk is reduced through the diversification of futures contracts across multiple exchanges and an insurance pool funded by funding rate fees.

  • Smart Contract Risk. Rigorous audits are employed to mitigate risks associated with smart contracts.

  • Protocol risk. The protocol will attest periodic Proof of Reserves based on merkle tree account hashes alongside account audits.

  • Market Volatility. In scenarios where the FIL price significantly rises, the net position might become under-hedged. This is actively controlled by augmenting future contracts when reaching preset thresholds that are continuously monitored. See more details in the Protocol Rebalancing section.

  • Staking Risk. The spot side of the transaction is secured using the GLIF protocol and relies on the security of the GLIF protocol.

  • Withdrawal Queue. Due to Filecoin’s finality protocols, withdrawals are not immediate. Upon redemption of USDfil, users receive an rFIL receipt, which is exchangeable one-for-one with FIL within (typically) one hour.

  • Regulatory risk. The protocol cannot accept users from the United States or sanctioned counties.

Protocol Rebalancing

Price fluctuations of the FIL token will result in the ratio of value of the deposits on-chain and on the CEX to fluctuate. The protocol is resilient to this through rebalancing. Rebalancing is performed in the scenario where the FIL price increases beyond a certain threshold, which imbalances the TVL of the protocol between the on-chain instrument and the CEX.

Threshold setting and rebalancing is performed in a conservative manner. Users should note that deposits will be temporarily disabled during rebalance, to protect the protocol. The status of the protocol is indicated on the protocol website.

Roadmap

The protocol's roadmap is to decentralize decision making and management control through the USDepin Token.

Early Access

USDfil is currently only available to whitelisted users. To request whitelist access, please navigate to https://usdfil.xyz

Last updated