Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EIP-2243: Stateless upgradable smart contracts for account addresses #2243

Closed
k06a opened this issue Aug 17, 2019 · 3 comments
Closed

EIP-2243: Stateless upgradable smart contracts for account addresses #2243

k06a opened this issue Aug 17, 2019 · 3 comments
Labels

Comments

@k06a
Copy link
Contributor

k06a commented Aug 17, 2019


eip: 2243
title: Stateless upgradable smart contracts for account addresses
author: Anton Bukov k06aaa@gmail.com
status: Draft
type: Standards Track
category: Core
created: 2019-08-17

Simple Summary

Transaction aggreagation is hard, one of the cases is #20 approve + transferFrom model, there were multiple tries including: #677, #827, #1003. They all fail because of complexity and requirement of checks on receivers side which can be forgotten. Many Dapps asks user to establish almost infinite approve once to interact with single transaction later, this opens dangerous flaws, recent example: https://blog.0xproject.com/post-mortem-0x-v2-0-exchange-vulnerability-763015399578

I propose to allow users to upload Stateless force-upgradable smart contracts to account addresses. Since it will be stateless there is no problems with upgrades and migrations. Simple contract could be used for start:

contract MyWallet {
    modifier onlySelf {
        require(msg.sender == address(this));
        _;
    }

    function() public payable {
    }

    function performCalls(
        address[] memory targets,
        uint256[] memory values,
        bytes[] memory calldataArray,
    )
        public
        onlySelf
        payable
    {
        for (uint i = 0; i < targets.length; i++) {
            (bool success,) = target.call.value(values[i])(calldataArray[i]);
            require(success);
        }
    }
}

Anyone will be able to group multiple transactions easily. No more infinite approves!

Abstract

Allow accounts to deploy smart contracts to its own addresses. This smart contrcats should not do SSTORE, else it should revert.

Motivation

We need a reliable way to group any transaction, even ERC20 approve + transferFrom.

Specification

Coming soon!

Rationale

Coming soon!

Backwards Compatibility

Should not be a problem, let's discuss.

@k06a k06a changed the title EIP-xxxx: Stateless upgradable smart contracts for account addresses EIP-2243: Stateless upgradable smart contracts for account addresses Aug 17, 2019
@ravachol70
Copy link

"This smart contrcats should not..." in the Abstract. Otherwise, it sounds nice and concise. It would be good to include some technical references, e.g. similar works, EIP's etc. —if they exist, that is.

Transaction aggreagation is hard

in the Simple Summary

@github-actions
Copy link

There has been no activity on this issue for two months. It will be closed in a week if no further activity occurs. If you would like to move this EIP forward, please respond to any outstanding feedback or add a comment indicating that you have addressed all required feedback and are ready for a review.

@github-actions github-actions bot added the stale label Nov 20, 2021
@github-actions
Copy link

github-actions bot commented Dec 4, 2021

This issue was closed due to inactivity. If you are still pursuing it, feel free to reopen it and respond to any feedback or request a review in a comment.

@github-actions github-actions bot closed this as completed Dec 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants