ERC-7425 Tokenized reserve

Draft · Vaults & DeFi · created 2023-06-30

A standard for transparently holding an organization's emergency fund (reserve) in a smart contract and ensuring that withdrawals only occur through an open proposal with stakeholder participation.

Why it is needed

Real-world organizations keep a reserve in case funds run short, and members agree on the conditions under which it can be drawn down. Recreating this on the blockchain requires two things: a record anyone can verify showing where funds came from and where they went, and a participatory mechanism that prevents the owner from withdrawing funds at will. Existing token vault standards (ERC-4626) define only basic functions such as deposits, withdrawals, and balance queries, leaving no defined way to audit the assets held in the vault or involve stakeholders. This standard extends ERC-4626 to record every fund movement as a proposal and defines a structure in which stakeholders support proposals by depositing.

What to implement

In depth

ERC-4626 extension structure and constructor fields

This standard is an extension that inherits the ERC-4626 vault interface. The constructor takes five parameters. name and ticker are the name and ticker of the ERC-20 token used for shares, asset is the underlying ERC-20 address of the ERC-4626 vault, rAuth is the authorized user for cases where there are multiple owners or owner withdrawals are restricted, and rOwner is the owner of the reserve. In the term definitions, reserve refers to assets held by the contract excluding the ERC-4626 underlying token, and proposal refers to what the owner or stakeholders create to request a withdrawal.

Tokens cannot leave without a proposal

To send tokens out of the reserve, a proposal MUST first be open. Opening a proposal MAY be requested by a stakeholder or the owner. Every new proposal SHOULD be recorded and its information retrievable via query functions, and the proposal's amount and address are REQUIRED recorded fields. Admitting new stakeholders requires criteria set by the owner, and onboarding uses the ERC-4626 vault's underlying asset.

Stakeholder participation: proposalDeposit and proposalWithdraw

Once a proposal is open, stakeholders MUST signal support via proposalDeposit. This function uses ERC-4626's deposit() to issue shares and SHOULD be the only way to deposit into the vault. The source notes that using ERC-4626's deposit() directly means the assets are not accounted for against the proposal. proposalWithdraw burns shares via ERC-4626's withdraw() and returns one-to-one value; userDeposit MUST be greater than or equal to userWithdrawal, and it SHOULD be the only way to withdraw the underlying token.

Owner actions: openProposal, closeProposal, depositReserve

openProposal MUST only be callable by the owner, MUST create a new policy number and record the withdrawal amount in the accounting, and MUST be the only way to withdraw ERC-20 tokens owned by the reserve, excluding share tokens deposited into proposals. closeProposal is called only by the owner, records the received amount in the accounting, and uses the close argument to choose whether to close the proposal. depositReserve is a function that records tokens the owner deposits into the reserve; no shares are issued, no refund is possible, and no proposal is opened. Both functions SHOULD emit the proposals and depositR events respectively.

Rationale for the share design

Each reserve uses the ERC-20 standard for shares and ERC-4626 for share creation. The underlying token can be called the reserve token, and the share token is issued by the ERC-4626 vault. Shares represent the stakeholders participating in a proposal, and a reserve MUST have stakeholder representation. How representation is handled as users enter and exit the vault is left to implementers. For example, the source gives the example that preventing the same reserve token from being used across multiple proposals allows for fair allocation of shares. Conditions not covered in the specification are designed to be handled case by case.

Proposal in Draft status

This document is a proposal in Draft status, created on June 30, 2023. As it has not yet been finalized, its content may change or progress may stall, so the latest status should be checked before implementation.

Things to watch out for

Original ERC · ← ERCs