---
eip: 4546
label: ERC-4546
title: Wrapped Deposits
status: Stagnant
type: Standards Track
category: ERC
created: 2021-12-11
official: https://eips.ethereum.org/EIPS/eip-4546
source: https://github.com/ethereum/ERCs/blob/master/ERCS/erc-4546.md
canonical: https://eips.huatuo.xyz/eip-4546/
lang: en
tldr: Proposed a single, immutable deposit contract that users approve once per token, which then forwards ETH, ERC-20, ERC-721 and ERC-1155 deposits to any app that opts in, so apps never need token approvals themselves.
tags: [deposits, approvals, erc20, erc721, erc1155, ux]
---

# ERC-4546: Wrapped Deposits

> A singleton contract for managing asset deposits.

**TL;DR:** Proposed a single, immutable deposit contract that users approve once per token, which then forwards ETH, ERC-20, ERC-721 and ERC-1155 deposits to any app that opts in, so apps never need token approvals themselves.

## What problem does it solve?

Depositing an ERC-20 into a dApp usually means first calling `approve` on the token for that dApp. Users choose between approving the exact amount every time (two transactions per deposit, costly and tedious) or granting an unlimited approval (convenient but risky if the dApp is compromised). And every dApp has to explain approvals to new users again.

ERC-4546 proposes a shared **wrapped deposit** contract. You approve it once per token; from then on any app that supports it can receive deposits from you, and none of those apps ever hold an allowance over your tokens.

## How it works

- A singleton contract, deployed at a well-known address, **non-upgradable** and with no mutable state.
- It exposes deposit functions for each asset type: `depositERC20`, `depositERC721`, `safeDepositERC721`, `safeDepositERC1155`, `batchDepositERC1155` and `depositEther`.
- Each deposit call:
  1. reverts if `to` has no code (deposits only go to contracts);
  2. calls an `accept…Deposit(depositor, …)` hook on `to`, which must return `true`;
  3. moves the asset from the user straight to `to` using the user's approval of the deposit contract, reverting on failure.
- Receiving contracts implement only the hooks for assets they want, and **must check that `msg.sender` is the deposit contract**, or anyone could fake a deposit.

## Sample code

A vault accepting ERC-20 deposits through the shared contract:

```solidity
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;

interface ERC20Receiver {
    function acceptERC20Deposit(address depositor, address token, uint256 amount) external returns (bool);
}

contract Vault is ERC20Receiver {
    address public immutable wrappedDeposit;
    mapping(address => mapping(address => uint256)) public balances; // user => token => amount

    constructor(address _wrappedDeposit) {
        wrappedDeposit = _wrappedDeposit;
    }

    function acceptERC20Deposit(address depositor, address token, uint256 amount) external returns (bool) {
        require(msg.sender == wrappedDeposit, "only wrapped deposit");
        balances[depositor][token] += amount;
        return true;
    }
}
```

User side (ethers v6): one approval, then deposits to any supporting app:

```ts
await token.approve(WRAPPED_DEPOSIT, MaxUint256);               // once per token
await wrappedDeposit.depositERC20(vaultAddress, tokenAddress, amount);
```

## Things to know

- **Status: Stagnant.** No canonical deployment address was agreed; do not rely on the example address in the spec.
- The receiving hook is called **before** the asset arrives, so the receiver credits a balance on the promise that the transfer will follow. That is safe only because the whole call reverts if the transfer fails.
- Users still grant an allowance, just to one small, audited, immutable contract instead of to every dApp. That contract becomes a high-value target, which is why the spec stresses keeping it tiny.
- In the spec's reference code the ERC-1155 hooks pass `to` where the token address would be expected; treat it as illustrative, not production-ready.
- Signature-based approvals such as [ERC-2612](/eip-2612/) `permit` tackle the same UX problem from another angle.


---

This is an unofficial plain-language summary. Read the full specification: https://eips.ethereum.org/EIPS/eip-4546
