Skip to content

Commit

Permalink
EIP-5313 Light Contract Ownership (#5313)
Browse files Browse the repository at this point in the history
* Create eip-xxx.md

* Update and rename eip-xxx.md to eip-5313.md

* Update eip-5313.md

* Update eip-5313.md

* Update eip-5313.md

* Relative link

* Add security talk

* Add rationale

* Update EIPS/eip-5313.md

Co-authored-by: Pandapip1 <[email protected]>

* Update EIPS/eip-5313.md

Co-authored-by: Pandapip1 <[email protected]>

* Update EIPS/eip-5313.md

Co-authored-by: Pandapip1 <[email protected]>

* Update EIPS/eip-5313.md

Co-authored-by: Pandapip1 <[email protected]>

* Update EIPS/eip-5313.md

Co-authored-by: Pandapip1 <[email protected]>

* Update EIPS/eip-5313.md

Co-authored-by: Pandapip1 <[email protected]>

Co-authored-by: Pandapip1 <[email protected]>
  • Loading branch information
fulldecent and Pandapip1 authored Jul 22, 2022
1 parent c21dbc3 commit 4ae69c5
Showing 1 changed file with 61 additions and 0 deletions.
61 changes: 61 additions & 0 deletions EIPS/eip-5313.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
---
eip: 5313
title: Light Contract Ownership
description: An interface for identifying ownership of contracts
author: William Entriken (@fulldecent)
discussions-to: https://ethereum-magicians.org/t/eip-5313-light-contract-ownership/10052
status: Draft
type: Standards Track
category: ERC
created: 2022-07-22
requires: 165, 173
---

## Abstract

This specification defines the minimum interface required to identify an account that controls a contract.

## Motivation

This is a slimmed-down alternative to [EIP-173](./eip-173.md).

## Specification

The key word “MUST” in this document is to be interpreted as described in RFC 2119.

Every contract compliant with this EIP MUST implement the `EIP5313` interface.

```solidity
// SPDX-License-Identifier: CC0-1.0
pragma solidity ^0.8.15;
/// @title EIP-5313 Light Contract Ownership Standard
interface EIP5313 {
/// @notice Get the address of the owner
/// @return The address of the owner
function owner() view external returns(address);
}
```

## Rationale

Key factors influencing the standard:

- Minimize the number of functions in the interface
- Backwards compatibility with existing contracts

This standard can be (and has been) extended by other standards to add additional ownership functionality. The smaller scope of this specification allows more and more straightforward ownership implementations, see limitations explained in EIP-173 under "other schemes that were considered".

Implementing [EIP-165](./eip-165.md) could be a valuable addition to this interface specification. However, this EIP is being written to codify existing protocols that connect contracts (often NFTs), with third-party websites (often a well-known NFT marketplace).

## Backwards Compatibility

Every contract that implements EIP-173 already implements this specification.

## Security Considerations

Because this specification does not extend EIP-165, calling this EIP's `owner` function cannot result in complete certainty that the result is indeed the owner. For example, another function with the same function signature may return some value that is then interpreted to be the true owner. If this EIP is used solely to identify if an account is the owner of a contract, then the impact of this risk is minimized. But if the interrogator is, for example, sending a valuable NFT to the identified owner of any contract on the network, then the risk is heightened.

## Copyright

Copyright and related rights waived via [CC0](../LICENSE.md).

0 comments on commit 4ae69c5

Please sign in to comment.