Introduction

Hi, I'm cardene, a software engineer and technical writer focused on blockchain and AI.

I've also authored Japanese technical books on specification-driven development with LLMs and decentralized application (DApp) development.

I also build and publish a variety of tools, libraries, and open-source projects.

This article examines ERC7770, a proposal for expanding token supply through lending while using reserve ratios to assess safety and redeemability.

The explanation below translates, summarizes, and expands on the original proposal.

I have also covered other EIPs, BIPs, SLIPs, CAIPs, ENSIPs, RFCs, and ACPs.

Overview

ERC7770 proposes a token standard for synthetic assets that are only partially redeemable for their underlying asset but are fully backed in aggregate by other collateral.

Here, a synthetic asset is not the original asset itself (such as DAI or ETH), but a representation issued on another chain or an asset issued against collateral. Unlike a conventional bridged asset, it is not necessarily immediately redeemable at a 1:1 ratio at all times. Redemption may be temporarily unavailable depending on liquidity.

ERC7770 standardizes two things:

  • An interface for minting fractional reserve tokens.
  • A disclosure interface through which token holders and lenders can assess the token's inherent economic risks, including reserve ratios, collateral conditions, and redeemability.

In short, ERC7770 provides a standard for issuing and operating synthetic tokens that are not always fully redeemable on demand, and for making their risk exposure visible through a common interface.

Motivation

The proliferation of L1s and L2s and the nature of bridged assets

Ethereum L2s and new L1s have proliferated in recent years. This is sometimes compared to a Cambrian explosion, in which a diverse ecosystem emerges rapidly.

The result has been a wide range of bridged assets. Examples include the following.

Example Description
ETH on Arbitrum A synthetic representation issued against ETH locked on Ethereum mainnet
WETH on BSC A synthetic representation issued against WETH on Ethereum

These are synthetic assets and are technically distinct from the original ETH. Bridges typically have the following properties, however.

  • 100% of the underlying asset is locked.
  • Redemption at a 1:1 ratio is guaranteed, although it may take time.

They are therefore fully reserved synthetic assets.

Fractional reserve tokens

ERC7770 addresses a different type of synthetic asset: fractional reserve tokens.

In this model, the entire outstanding token supply is not necessarily backed directly by an equivalent quantity of the original asset. Instead:

  • A portion is backed by the underlying asset itself (such as DAI).
  • The remainder is issued through borrowing against other deposited collateral (such as ETH).

This allows the money supply within a chain or ecosystem to expand.

An example using frDAI

Consider frDAI, a hypothetical fractional reserve synthetic DAI token.

frDAI is issued in the following ways.

  1. A user deposits 1 DAI and receives 1 frDAI.
  2. A user deposits collateral worth at least 1 DAI (such as ETH) and borrows 1 newly issued frDAI.

Redemption works as follows.

  • As long as the contract holds DAI, frDAI can be exchanged immediately for DAI at a 1:1 ratio.
  • If all DAI reserves are withdrawn, holders of the remaining frDAI must wait for borrowers to repay their loans.
  • In the meantime, the market price of frDAI may temporarily fall below 1 DAI.

This resembles a bank run, in which insufficient liquidity can lead to a temporary price deviation.

Multiple risk managers and the need for standardization

Fractional reserve tokens are expected to have complex arrangements such as these.

  • Multiple lending protocols have minting authority.
  • Multiple risk managers determine collateral ratios, liquidation conditions, and other parameters.
  • Collateral composition and reserve ratios change over time.

Token holders and lenders need access to the following information.

Information What it indicates
Reserve ratio How much can be redeemed immediately
Collateral composition Which assets provide backing
Outstanding debt How much borrowers have issued
Liquidity risk Whether redemption remains possible during a run

If each protocol publishes this information differently, comparison and auditing become difficult.

The role of ERC7770

ERC7770 does not prescribe the financial soundness of the fractional reserve banking model itself, including whether it can avoid insolvency or withstand a run.

Its objectives are to:

  • Standardize how fractional reserve synthetic tokens are minted.
  • Make economic risk information, such as reserve ratios and collateral conditions, accessible through a token standard.
  • Give holders and lenders a foundation for quantifying risk.

ERC7770 thus provides a common interface for assessing the risks of fractional reserve synthetic assets.

Specification

Interface

ERC7770 defines the following interface. It extends IERC20 with events and functions specific to fractional reserves, in addition to ordinary token operations.

IERCXXX.sol
interface IERCXXX is IERC20 {
  // events
  event MintFractionalReserve(address indexed minter, address to, uint256 amount);
  event BurnFractionalReserve(address indexed burner, address from, uint256 amount);
  event SetSegregatedAccount(address account, bool segregated);

  // functions
  // setters
  function fractionalReserveMint(address _to, uint256 _amount) external;
  function fractionalReserveBurn(address _from, uint256 _amount) external;
 
 // getters
  function totalBorrowedSupply() external view returns (uint256);
  function requiredReserveRatio() external view returns (uint256);
  function segregatedAccount(address _account) external view returns (bool);
  function totalSegregatedSupply() external view returns (uint256);
}

The elements serve the following purposes.

Element Purpose
MintFractionalReserve Event indicating that tokens have been minted through borrowing
BurnFractionalReserve Event indicating that tokens have been burned through loan repayment
SetSegregatedAccount Event indicating a change in the designation of a segregated account (described below)
fractionalReserveMint Function for issuing tokens as a loan against collateral
fractionalReserveBurn Function for burning tokens when a loan is repaid
totalBorrowedSupply Total supply issued through borrowing that has not yet been repaid
requiredReserveRatio Minimum reserve ratio to maintain
segregatedAccount Whether a given address is designated as segregated
totalSegregatedSupply Total token balance held in segregated accounts

Reserve ratio

The reserve ratio measures the proportion of the total supply represented by cash-equivalent tokens available for immediate redemption.

For this purpose, immediately redeemable supply excludes tokens minted through borrowing as well as tokens held in segregated accounts, since the latter cannot be used as liquidity.

It is defined as follows.

totalSupply()−totalBorrowedSupply()−∑a∈SegregatedbalanceOf(a)totalSupply()\frac{totalSupply() - totalBorrowedSupply() - \sum_{a \in Segregated} balanceOf(a)}{totalSupply()}

This value multiplied by 1e18 must be greater than or equal to requiredReserveRatio(). If it falls below that threshold, no additional fractional reserve minting is permitted and the contract must revert.

This safeguard requires a minimum proportion of immediately redeemable funds at all times.

Minting and burning

The fractionalReserveMint and fractionalReserveBurn functions are not intended to be callable by anyone. They are intended for authorized addresses, such as risk managers or lending protocols.

Minting

When fractionalReserveMint(_to, _amount) succeeds, all of the following increases must occur together.

Value Increase
totalSupply +_amount
totalBorrowedSupply +_amount
Balance of _to +_amount

The MintFractionalReserve event is emitted at the same time.

If the reserve ratio after minting is below requiredReserveRatio(), however, the operation must revert.

The specification also presents another form of the reserve ratio:

totalSupply()−∑a∈SegregatedbalanceOf(a)totalSupply()+totalBorrowedSupply()\frac{totalSupply() - \sum_{a \in Segregated} balanceOf(a)}{totalSupply() + totalBorrowedSupply()}

In this case as well, minting is not permitted if the ratio exceeds requiredReserveRatio(), as stated in the original Japanese explanation. Implementations must carefully check whether the conditions are satisfied before and after minting.

Burning

When fractionalReserveBurn(_from, _amount) succeeds, the following values decrease together.

Value Decrease
totalSupply -_amount
totalBorrowedSupply -_amount
Balance of _from -_amount

The BurnFractionalReserve event must be emitted. This corresponds to repayment of a loan.

Segregated accounts

Segregated accounts are special addresses whose balances must not be counted as liquidity. Examples include collateral liquidation pools, insurance funds, and accounts holding interest awaiting distribution.

The specification requires the following invariant to hold at all times.

∑a∈SegregatedbalanceOf(a)=totalSegregatedSupply()\sum_{a \in Segregated} balanceOf(a) = totalSegregatedSupply()

The sum of the balances of all addresses marked as segregated must equal totalSegregatedSupply() exactly. An implementation that does not maintain this accounting invariant violates the standard.

Account balances and interest distribution

The fractionalReserveMint function is intended primarily for use with lending. Users deposit collateral, borrow tokens, and pay interest in return.

A portion of this interest revenue is expected to be distributed to holders who meet the following conditions.

  • Their addresses are not segregated accounts.
  • In other words, they are ordinary liquidity providers or holders.

ERC7770 does not, however, define how interest is calculated or distributed. It assumes an economic model involving borrowing and interest and suggests that the resulting income should benefit holders in non-segregated accounts. The implementation is left to each protocol.

Compatibility

The proposal is compatible with ERC20.

For more on ERC20, see the following article.

[ERC20] An Introduction to ERC20

Reference implementation

FractionalReserveToken.sol
// The code below is provided only for illustration, DO NOT use it in production
contract FractionalReserveToken is ERC20, Ownable {

    event MintFractionalReserve(address indexed minter, address to, uint256 amount);
    event BurnFractionalReserve(address indexed burner, address from, uint256 amount);
    event SetSegregatedAccount(address account, bool segregated);

    /// @notice token supply in these accounts is not counted towards the reserve, and
    /// therefore, additional token supply cannot be minted against them.
    mapping(address => bool) public segregatedAccount;

    /// @notice ratio between the token that is available as cash (immediate redemption)
    /// and the total supply of the token.
    uint256 public requiredReserveRatio;

    uint256 public totalBorrowedSupply;

    constructor(
        string memory _name,
        string memory _symbol
    ) ERC20(_name, _symbol) Ownable(msg.sender) {}

    function fractionalReserveMint(address to, uint256 amount) external onlyOwner {
        _mint(to, amount);
        totalBorrowedSupply += amount;
        emit MintFractionalReserve(msg.sender, to, amount);

        uint256 reserveRatio = (totalSupply() - totalBorrowedSupply - segregatedSupply) * 1e18 / totalSupply();
        require(reserveRatio >= requiredReserveRatio, "reserveRatio");
    }
    function fractionalReserveBurn(address from, uint256 amount) external onlyOwner {
        _burn(from, amount);
        totalBorrowedSupply -= amount;
        emit BurnFractionalReserve(msg.sender, from, amount);
    }

    // ------------------------------------------------------------------------------
    // Code below is not part of the standard
    // ------------------------------------------------------------------------------
    uint256 internal segregatedSupply; // supply of segregated tokens

    function _update(address from, address to, uint256 value) internal override {
        // keep the reserve up to date on transfers
        if (!segregatedAccount[from] && segregatedAccount[to]) {
            segregatedSupply += value;
        }
        if (segregatedAccount[from] && !segregatedAccount[to]) {
            segregatedSupply -= value;
        }
        ERC20._update(from, to, value);
    }

    function mint(address account, uint256 value) external onlyOwner {
        _mint(account, value);
    }

    function burn(address account, uint256 value) external onlyOwner {
        _burn(account, value);
    }

    function setSegregatedAccount(address account, bool segregated) external onlyOwner {
        if (segregated) {
            require(!segregatedAccount[account], "segregated");
            segregatedSupply += balanceOf(account);
        } else {
            require(segregatedAccount[account], "!segregated");
            segregatedSupply -= balanceOf(account);
        }
        segregatedAccount[account] = segregated;
        emit SetSegregatedAccount(account, segregated);
    }

    function setRequiredReserveRatio(uint256 value) external onlyOwner {
        requiredReserveRatio = value;
    }
}

Security

ERC7770 is a token standard based on a fractional reserve financial model. As with banks and lending markets, this model does not always back the entire outstanding supply with immediately redeemable assets. It therefore inherently involves the following economic risks.

  • Inability to redeem immediately due to insufficient liquidity.
  • Effective insolvency following a sharp decline in collateral value.
  • Bank runs triggered by market uncertainty.
  • Loss of confidence due to price deviations (depegging).

ERC7770 is designed with these risks in mind, but does not prescribe operational safeguards, such as how to prevent these outcomes or how much risk is acceptable.

Its security scope can be summarized as follows.

Aspect Scope of the standard
Soundness of the economic model Not specified
Appropriate collateral ratios Not specified
Liquidation logic Not specified
Interest rate design Not specified
Bank run mitigation Not specified
Visibility into risk information Provided by the standard

ERC7770 provides only a common interface for managing a financial structure that involves fractional reserve risk. Controlling that risk is the responsibility of the following parties.

  • Token issuers.
  • Risk curators.
  • Lending market operators.
  • Designers of contracts with minting authority.

In other words, ERC7770 is not a standard that makes risky financial activities safe. It makes their risks visible so that multiple financial actors can evaluate them on a common basis.

Reserve ratio settings, collateral types, liquidation conditions, interest rate curves, and insurance mechanisms are therefore left to the economic design and governance of each protocol. The standard provides a consistent way to represent and retrieve information about these arrangements rather than prescribing the correct choices.

The issue here is the soundness of the financial system, rather than smart contract security alone. ERC7770 deliberately separates these responsibilities.

Citation

Yaron Velner (@yaronvel), "ERC-7770: Fractional Reserve Token [DRAFT]," Ethereum Improvement Proposals, no. 7770, September 2024. [Online serial]. Available: https://eips.ethereum.org/EIPS/eip-7770.

Conclusion

This article covered ERC7770, a proposal for expanding token supply through lending and assessing risk and redeemability using reserve ratios. I hope it helped clarify how the model works.

If you have questions, feel free to contact me via Twitter DM.

Twitter @cardene777

I also publish on other platforms: