Ethereum Improvement Proposals, or EIPs, are suggestions for changes or improvements to the Ethereum network. They are typically submitted by members of the Ethereum community and can range from minor technical tweaks to significant protocol changes for the network. There are EIPs that propose changes to the protocol and those that propose new functionalities. The ones that propose changes to the protocol are related to changes in the network rules, consensus algorithm, block gas limit calculation, gas prices, opcodes cost, and others. The ones that propose new functionalities are related to new functionalities that can be added to the protocol.
The Process
✅ Submission of a proposal
✅ Discussion and Review by Community
✅ Proposal receives enough support
✅ Implementation into Ethereum's codebase
List of some EIPs
✅ EIP-160: Expanding the EVM's storage model
✅ EIP-170: Contract code size limit increase
✅ EIP-20: Standard token API
✅ EIP-721: Creating non-fungible tokens
✅ EIP-608: Modexp precompile
✅ EIP-616: Net gas metering for SSTORE operations
✅ EIP-659: Create a Call-Depth Attestation Precompile
✅ EIP-1344: Add chainID opcode
✅ EIP-1884: Repricing for trie-size-dependent opcodes
✅ EIP-1559: Fee market change for Ethereum
✅ EIP-1108: Reduce alt_bn128 precompile gas costs
✅ EIP-1702: Precompile for verification of elliptic curve signatures
Let's take a look at these 5 EIPs: EIP-20, EIP-721, EIP-1559, EIP-1108, EIP-1884
EIPs that define interfaces
EIP-20 and EIP-721 are the two Ethereum Improvement Proposals that have interfaces.
EIP-20
EIP-20 standard defines a basic standard for tokens on the Ethereum blockchain.
pragma solidity ^0.8.0;
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
}
The primary functions that a contract implementing EIP-20 should have are illustrated in this code's definition of the IERC20 interface. The interface outlines the capabilities of the functions totalSupply
, balanceOf
, transfer
, approve
, transferFrom
, and allowance
. A contract needs to use this interface in order to implement the EIP-20 standard.
EIP-721
ERC-721 is a standard for creating non-fungible tokens (NFTs)
pragma solidity ^0.8.0;
interface IERC721 {
function name() external view returns (string memory);
function symbol() external view returns (string memory);
function totalSupply() external view returns (uint256);
function balanceOf(address owner) external view returns (uint256);
function ownerOf(uint256 tokenId) external view returns (address);
function approve(address to, uint256 tokenId) external;
function getApproved(uint256 tokenId) external view returns (address);
function transfer(address to, uint256 tokenId) external;
function transferFrom(address from, address to, uint256 tokenId) external;
function supportsInterface(bytes4 interfaceId) external view returns (bool);
event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);
}
The primary features that a contract implementing EIP-721 ought to have are illustrated in this code's definition of an interface called IERC721. The functions name
, symbol
, totalSupply
, balanceOf
, ownerOf
, approve
, getApproved
, transfer
, transferFrom
, supportsInterface
, and events Transfer
and Approval
are defined in the interface. A contract must implement this interface in order to comply with the EIP-721 standard.
It's important to remember that EIP-721 is both an expansion of EIP-20 and an implementation of the IERC20 interface.
Other EIPs
EIP-1559
This EIP proposes a change to the way gas prices are set in Ethereum transactions. It aims to improve the user experience by making gas prices more predictable and reducing the likelihood of network congestion.
EIP-1108
This EIP proposes a change to the way the Ethereum virtual machine (EVM) handles certain types of code execution, in order to improve performance and reduce costs for certain types of smart contracts.
EIP-1884
This EIP proposes an increase in the cost of certain types of opcodes, in order to reduce the risk of smart contract reentrancy attacks.
Summary
This article provides answers to the following
✅ What is Ethereum Improvement Proposals (EIPs)?
✅ Who submits EIPs?
✅ What types of changes can EIPs propose to the Ethereum network?
✅ What is the process for EIPs to be implemented into the Ethereum network?
✅ What are some examples of EIPs?
✅ What are the interfaces of EIP-20 and EIP-721?
✅ What does EIP-1559 propose to change in Ethereum transactions?
✅ What is the goal of EIP-1108?
✅ What does EIP-1884 propose to change in relation to smart contracts on the Ethereum network?
EIPs are an important part of the Ethereum ecosystem, as they allow for the continual improvement and evolution of the platform. They are also an example of how decentralized communities can collaborate and make decisions together.