USDepin//USDfil
Yield-bearing, synthetic stablecoin. Backed by FIL. Deployed on FVM.
USDfil is the native stablecoin of the USDepin protocol on Filecoin - it is described in this document. The USDepin protocol is a multichain protocol for stablecoins, backed by physical hardware assets, DeFi yield, and perpetual derivatives. It is enabling stable, permissionless transactions backed by decentralized physical infrastructure (DePIN).
Protocol Description
USDfil is a 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 1-to-1 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:
A set of smart contracts deployed on the Filecoin Virtual Machine (FVM) that are the core logic of the USDfil.
The $USDfil token, an ERC20 token that is the native synthetic stablecoin pegged to the USD.
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.
FIL
USDfil
USDfil
rFIL
rFIL
FIL
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:
Hold the FIL deposit in a temporary buffer.
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.
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 theavg_fill_price
is the average price at which the short position was opened on the CEX.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.
Note: The maximum deposit that the protocol can accept is 100 FIL every 60 seconds, to prevent slippage. As the protocol matures, rate limits will be increased.
Withdrawals
The protocol executes the following steps when USDfil is deposited (i.e. a withdrawal request):
Hold the USDfil deposit in a temporary buffer.
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.
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 theavg_fill_price
is the average price at which the short position was closed on the CEX.If the hedged position does not successfully close 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.
Note: The maximum withdrawal that the protocol can accept is 500 USDfil every 60 seconds, to prevent slippage. As the protocol matures, rate limits will be increased.
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 (due to finality), 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 currently generates yield from three sources: basis management, futures funding rates, and spot GLIF yield.
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 4-30%, also benefiting an insurance fund.
GLIF spot. Currently spot FIL deposits earn yield through GLIF. As the protocol expands it welcomes integrations with other yield generators.
User yield. Currently, yield contributes to reserves and insurance fund. Soon the USDfil DAO plans to switch on user yield. This will happen via the staked USDfil token, sUSDfil, around Q4 2024. The historical protocol yield for the past 1 year (to August 2024) has averaged 15.1%:
Risks
Different protocols have different features and risk profiles. Centralized stablecoins like USDC and USDT carry unhedgeable custodial risks and rely on legacy banking systems, making them vulnerable to credit and regulatory issues. DAI type stablecoins, while overcollateralized, still face liquidation risks due to the volatility of its backing assets and suffers from capital inefficiency. USDfil addresses capital efficiency and leverages DeFi protocols like GLIF for decentralized yield. Still the protocol has risks that need to be understood. These are set out as follows:
Collateralization. The protocol operates without leverage. The USDfil token is fully collateralized, ensuring 1-to-1 backing.
Exchange Risk. As the protocol grows this risk will be diversified by spreading futures contracts across multiple exchanges and through an insurance pool funded by funding rate fees.
Basis Risk. The protocol’s hedging algorithm takes advantage of fluctuations in spot-futures price difference.
Sustained negative funding rates. The futures funding rate by design exhibit a mean-reversion property for the delta between futures and spot prices. The current USDfil design tolerates sustained average negative short funding rates of -8%. Historically the premium for perpetual shorts on Filecoin sits between approximately positive 4-30%.
Smart Contract Risk. Periodic and upgrade audits will be employed to mitigate risks associated with smart contracts.
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, and the risk is minimized by not using leverage. 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.
Protocol risk. In the near future the protocol will attest periodic Proof of Reserves based on merkle tree account hashes alongside account audits.
Withdrawal Queue. Due to Filecoin’s finality protocols, withdrawals are not currently instant. Upon redemption of USDfil, users receive an rFIL receipt, which is exchangeable one-for-one with FIL within one hour with current finality. UX is smoothened with a limited withdrawal buffer that enables immediate withdrawals, which are replenished when hedged positions are closed.
Regulatory risk. The protocol cannot accept users from the United States, sanctioned or otherwise restricted countries listed on the protocol interface website.
Feedback and information to improve protocol transparency and operation are greatly appreciated. If you identify any unaddressed risks, please notify protocol contributors at stability@usdfil.xyz.
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 refused during rebalancing 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. For more details, see here.
Access
USDfil is currently only available to users who accept the terms of service, indicated on the app's website.
Contributors: to get involved with the USDfil DAO, reach out to TreeDAO@usdfil.xyz.
Last updated