---
eip: 900
label: ERC-900
title: Simple Staking Interface
status: Stagnant
type: Standards Track
category: ERC
created: 2018-02-22
official: https://eips.ethereum.org/EIPS/eip-900
source: https://github.com/ethereum/ERCs/blob/master/ERCS/erc-900.md
canonical: https://eips.huatuo.xyz/eip-900/
lang: en
tldr: A minimal interface for locking ERC-20 tokens as a stake, with stake, unstake and balance queries plus optional history; it is Stagnant and never became a widely used standard.
tags: [staking, token, interface, stagnant]
---

# ERC-900: Simple Staking Interface

> The following standard describes a common staking interface allowing for easy to use staking systems. The interface is kept simple allowing for various use cases to be implemented. This standard describes the common functionality for staking as well as providing information on stakes.

**TL;DR:** A minimal interface for locking ERC-20 tokens as a stake, with stake, unstake and balance queries plus optional history; it is Stagnant and never became a widely used standard.

## What problem does it solve?

Many token systems ask users to lock up tokens to take part: voting, curating lists, running services, or earning rewards. In 2018 each project designed its own staking contract, so wallets and other contracts had to learn a new interface every time.

ERC-900 proposes a small, common staking interface. Any app can then stake, unstake, and read stake totals the same way, whatever the stake is used for. The spec mentions token-curated registries as one target use case.

## How it works

A staking contract is tied to one token, given by `token()`, and exposes:

| Function | Purpose |
| --- | --- |
| `stake(amount, data)` | Lock `amount` tokens from the caller. Must emit `Staked` |
| `stakeFor(user, amount, data)` | Lock tokens from the caller on behalf of `user` |
| `unstake(amount, data)` | Return tokens. Must revert if unstaking is not possible right now. Must emit `Unstaked` |
| `totalStakedFor(addr)` | Current stake of one address |
| `totalStaked()` | Total stake in the contract |
| `supportsHistory()` | `true` if the optional history functions exist |

Optional history functions are `lastStakedFor(addr)`, `totalStakedForAt(addr, blockNumber)` and `totalStakedAt(blockNumber)`. They let governance tools read stakes at a past block.

The `data` argument is free-form. More complex systems can use it to signal intent, for example which list entry a stake supports.

Events: `Staked(user, amount, total, data)` and `Unstaked(user, amount, total, data)`, where `total` is the user's new stake.

## Sample code

A minimal implementation without history (illustration only):

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

import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";

contract SimpleStaking {
    event Staked(address indexed user, uint256 amount, uint256 total, bytes data);
    event Unstaked(address indexed user, uint256 amount, uint256 total, bytes data);

    IERC20 public immutable stakingToken;
    mapping(address => uint256) public totalStakedFor;
    uint256 public totalStaked;

    constructor(IERC20 t) { stakingToken = t; }

    function token() external view returns (address) { return address(stakingToken); }
    function supportsHistory() external pure returns (bool) { return false; }

    function stake(uint256 amount, bytes calldata data) external { stakeFor(msg.sender, amount, data); }

    function stakeFor(address user, uint256 amount, bytes calldata data) public {
        require(stakingToken.transferFrom(msg.sender, address(this), amount), "transfer");
        totalStakedFor[user] += amount;
        totalStaked += amount;
        emit Staked(user, amount, totalStakedFor[user], data);
    }

    function unstake(uint256 amount, bytes calldata data) external {
        totalStakedFor[msg.sender] -= amount;     // reverts on underflow
        totalStaked -= amount;
        require(stakingToken.transfer(msg.sender, amount), "transfer");
        emit Unstaked(msg.sender, amount, totalStakedFor[msg.sender], data);
    }
}
```

## Things to know

- **This proposal is Stagnant and was never finalized.** It is not a widely used standard, and most staking systems define their own interfaces.
- The interface in the spec uses old Solidity syntax (`public` functions in an interface, `bytes` without a data location). Adjust it to compile with modern compilers.
- `stakeFor` pulls tokens from the caller but credits another address. Decide who may later `unstake` those tokens before using it.
- For deposit-and-share accounting on tokens, [ERC-4626](/eip-4626/) tokenized vaults are now the common standard, though they solve a different problem than lock-up staking.


---

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