ERC20

  • https://theethereum.wiki/w/index.php/ERC20_Token_Standard
    • https://theethereum.wiki/w/index.php/Golem_Network_Token
  • https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20-token-standard.md
    • https://github.com/ethereum/EIPs/issues/20
  • Zeppelin Token
    • https://github.com/OpenZeppelin/zeppelin-solidity/tree/master/contracts/token
  • DS-Token
    • https://dapp.tools/dappsys/ds-token.html
    • https://github.com/dapphub/ds-token/blob/master/src/token.sol

ERC223

  • https://www.youtube.com/watch?v=GS62VNyPVHs
  • https://github.com/Dexaran/ERC223-token-standard/tree/Recommended

Parity multi-sig

  • Nov-6, 2017 kill bug
    • instead of invoking initWallet on any wallet contract, the attacker called initWallet in the library contract itself.
    • Parity did not anticipate the scenario of this library contract being suicided.
    • https://blog.ethcore.io/security-alert/
    • https://blog.comae.io/the-280m-ethereums-bug-f28e5de43513
    • https://blog.zeppelinos.org/parity-wallet-hack-reloaded/
    • https://ethereum.stackexchange.com/a/30130
    • tx1 : https://etherscan.io/tx/0x05f71e1b2cb4f03e547739db15d080fd30c989eda04d37ce6264c5686e0722c9
    • tx2 : https://etherscan.io/tx/0x47f7cff7a5e671884629c93b368cb18f58a993f4b19c2a53a8662e3f1482f690
  • July-19, 2017 initWallet bug
    • https://blog.zeppelin.solutions/on-the-parity-wallet-multisig-hack-405a8c12e8f7
    • https://github.com/paritytech/parity/commit/e06a1e8dd9cfd8bf5d87d24b11aee0e8f6ff9aeb
    • https://blog.ethcore.io/the-multi-sig-hack-a-postmortem/
    • https://www.youtube.com/watch?v=VUH4gRDQYsA (迄今为止见过的最为详尽的视频介绍,甚至包括如何一步一步重现攻击)
  • Fix
    • danger of delegatecall
      • https://ethereum.stackexchange.com/questions/3667/difference-between-call-callcode-and-delegatecall
    • using Aragon/zeppelin way
      • https://blog.aragon.one/library-driven-development-in-solidity-2bebcaf88736

ERC721

  • ERC721代币的核心是“Non-Fungible Tokens” NFT,不可互换的代币。怎么理解“不可互换”? 比如你有2只猫(猫A和猫B),你的代币数量就是2,但是猫A和猫B是不同的,当你卖出你的猫时,你必须指定是卖哪只猫,因为猫A和猫B是不可以互换的。类比ERC20,就好比你有2块钱,这两块钱,你花其中任意一块钱,都不影响结果,只要账户里扣一块钱就可以了。 ERC721每个代币都有一个独立唯一的tokenid,这个id在这个cryptokitties里就是猫的id.

  • In economics, fungibility is the property of a good or a commodity whose individual units are essentially interchangeable. For example, since one kilogram of pure gold is equivalent to any other kilogram of pure gold, whether in the form of coins, ingots, or in other states, gold is fungible.

  • fungibility, 可互换,可互换物品,可替代性

  • https://github.com/ethereum/EIPs/issues/721

    • http://ethfans.org/posts/eip-721-non-fungible-token-standard

以太猫

  • https://etherscan.io/address/0x06012c8cf97bead5deae237070f9587f8e7a266d#readContract

References

  • https://consensys.github.io/smart-contract-best-practices/
    • (CN) https://github.com/ConsenSys/smart-contract-best-practices/blob/master/README-zh.md