tktechblog

日々の記録用です。blockchain,bitcoin,ethereumメインです。

EIP1080,1081

eip-1080:recoverable token

simple summary

A standard interface for tokens that support chargebacks, theft prevention, and lost & found resolutions.

盗難時やlost&found resolutionsの時のトークンの扱いの基準。

abstract

The following standard allows for the implementation of a standard API for tokens extending ERC-20 or ERC-791. This standard provides basic functionality to recover stolen or lost accounts, as well as provide for the chargeback of tokens.
erc20やerc791のようなトークンのapi実行を許可する基準。

motivation

強盗にあってトークンやアセットの無くなったり盗まれたりした際に影響を和らげたり、他の紛争の手助けになるようにすること。ethereumプロトコルは無くなったり、盗まれたり、紛争によって修正されるべきではない。それらの問題はプロトコルレイヤーで解決可能である

specification
  • Recoverable token
    methods
  - claimLost
`function claimLost(address lostAccount) returns (bool success)`  

  - cancelLostClaim
`function claimLost() returns (bool success)`  

  - reportStoren  
`function reportStolen() returns (bool success)`  

  - chargeback  
`function chargeback(uint256 pendingTransferNumber) returns (bool success)`  

  - getPendingTransferTimeInMinutes  
`function getPendingTransferTime(address account) view returns (uint256 minutes)`

  - setPendingTransferTimeInMinutes  
`function setPendingTransferTime(uint256 minutes) returns (bool success)`  

  - getLostAccountRecoveryTimeInMinutes  
`function getLostAccountRecoveryTimeInMinutes(address account) view returns (uint256 minutes)`  

  - setLostAccountRecoveryTimeInMInutes
`function setLostAccountRecoveryTimeInMinutes(uint256 minutes) returns (bool success)`  
  • Events
  - AccountRecovered  
`event AccountClaimedLost(address indexed account, address indexed newAccount)`

  - AccountClaimedLostCanceled  
`event AccountClaimedLost(address indexed account)`  

  - AccountClaimedLost  
`event AccountClaimedLost(address indexed account)`  

  - PendingTransfer  
`event PendingTransfer(address indexed from, address indexed to, uint256 value, uint256 pendingTransferNumber)`  

  - ChargebackRequested  
`event ChargebackRequested(address indexed from, address indexed to, uint value, uint256 pendingTransferNumber)`  

  - Chargeback  
`event Chargeback(address indexed from, address indexed to, uint256 value, uint256 indexed pendingTransferNumber)`  

  - AccountFrozen 
`event AccountFrozen(address indexed reported)`  
Rationale
  • A recoverable token standard can provide configurable saftey for users or contracts who desire this saftey.
  • Implementations of this standard will give users the ability to select a dispute resolution process on an opt-in basis and benefit the community by decreasing the necessity of consideration of token recovery actions.

recoverable token standardは安全性の構成可能性の提供によって、ユーザーやコントラクトの安全性の要求に答える

このstandardの実行は、ユーザーにオプトインベースでユーザーに論争解決の選択肢として提供することができるし、コミュニティにとっても、補填行動に意識をおく負担が減る。

source

github.com

eip-1081:Standard Bounties

simple summary

A standard contract and interface for issuing bounties on Ethereum, usable for any type of task, paying in any ERC20 token or in ETH.

erc20トークンやethにcontractやinterfaceに解決不能なissueを記入し、報酬と合わせて支払いを行う仕組みの提案。bug bounty.

abstract/motivation

web2.0はbug bountyとともに開発スピードが高まって行ったが、イーサリアムにもあった方が開発が早く進むと考える。

specification
  • a bounty is issued: an issuer specifies the requirements for the task, describing the desired outcome, and how much they would be willing to pay for the completion of that task (denoted in one or several tokens).
  • a bounty is fulfilled: a bounty fulfiller may see the bounty, complete the task, and produce a deliverable which is itself the desired outcome of the task, or simply a record that it was completed. Hashes of these deliverables should be stored immutably on-chain, to serve as proof after the fact.
  • a fulfillment is accepted: a bounty issuer or arbiter may select one or more submissions to be accepted, thereby releasing payment to the bounty fulfiller(s), and transferring ownership over the given deliverable to the issuer.

フローとコードベースの仕様がEIP状に載っている。

ex)

{
   name: // optional - A string representing the name of the persona
   email: // optional - A string representing the preferred contact email of the persona
   githubUsername: // optional - A string representing the github username of the persona
   address: // required - A string web3 address of the persona
}

bounty issuance data Schema

{
  payload: {
    title: // A string representing the title of the bounty
    description: // A string representing the description of the bounty, including all requirements
    issuer: {
       // persona for the issuer of the bounty
    },
    funders:[
       // array of personas of those who funded the issue.
    ],
    categories: // an array of strings, representing the categories of tasks which are being requested
    created: // the timestamp in seconds when the bounty was created
    tokenSymbol: // the symbol for the token which the bounty pays out
    tokenAddress: // the address for the token which the bounty pays out (0x0 if ETH)

    // ------- add optional fields here -------
    sourceFileName: // A string representing the name of the file
    sourceFileHash: // The IPFS hash of the file associated with the bounty
    sourceDirectoryHash: // The IPFS hash of the directory which can be used to access the file
    webReferenceURL: // The link to a relevant web reference (ie github issue)
  },
  meta: {
    platform: // a string representing the original posting platform (ie 'gitcoin')
    schemaVersion: // a string representing the version number (ie '0.1')
    schemaName: // a string representing the name of the schema (ie 'standardSchema' or 'gitcoinSchema')
  }
}

bounty fulfillment data schema

{
  payload: {
    description: // A string representing the description of the fulfillment, and any necessary links to works
    sourceFileName: // A string representing the name of the file being submitted
    sourceFileHash: // A string representing the IPFS hash of the file being submitted
    sourceDirectoryHash: // A string representing the IPFS hash of the directory which holds the file being submitted
    fulfillers: {
      // personas for the individuals whose work is being submitted
    }

    // ------- add optional fields here -------
  },
  meta: {
    platform: // a string representing the original posting platform (ie 'gitcoin')
    schemaVersion: // a string representing the version number (ie '0.1')
    schemaName: // a string representing the name of the schema (ie 'standardSchema' or 'gitcoinSchema')
  }
}
rationale

web3.0 ecosystem

source

github.com