Skip to content

Instantly share code, notes, and snippets.

View tranvictor's full-sized avatar

Victor Tran tranvictor

View GitHub Profile
sync(ethereum, callback) {
var promise
promise = new Promise((resolve, reject) => {
const acc = this.shallowClone()
ethereum.getBalance(acc.address, (balance) => {
acc.balance = balance
resolve(acc)
})
})
victor@Vus-MacBook-Pro ~/Dropbox/Project/audit-coindash/ver3 (dev●)$ truffle test [ruby-2.0.0p648]
Compiling ./contracts/CDTMultiSigWallet.sol...
Compiling ./contracts/CDTToken.sol...
Compiling ./contracts/Contribution.sol...
Compiling ./contracts/Migrations.sol...
Compiling ./contracts/zeppelin-solidity/contracts/Bounty.sol...
Compiling ./contracts/zeppelin-solidity/contracts/DayLimit.sol...
Compiling ./contracts/zeppelin-solidity/contracts/LimitBalance.sol...
Compiling ./contracts/zeppelin-solidity/contracts/MultisigWallet.sol...
Compiling ./contracts/zeppelin-solidity/contracts/ReentrancyGuard.sol...
@tranvictor
tranvictor / draft.md
Last active June 27, 2017 21:00 — forked from yaronvel/draft.md

In the dates of June 20th 2017 to June 30th 2017, CoinDash engaged Yaron Velner and Victor Tran from the SmartPool team to perform security audit for their ICO contracts. The audited contracts currently resides in CoinDash private repository. The audited code was timestamped with the hash 0b8fc008894dddc60d1233b84d877b5a76473d32 in the CoinDash repository.

Terminology

This audit uses the following terminology. Note that we only rank the likelihood, impact and $Severity$ for bug/security-related issues.

This file has been truncated, but you can view the full file.
{"long_window_duration":86400,"long_window_sample":{"2497296":{"mined_share":51,"valid_share":51,"total_valid_difficulty":204000000000,"average_share_difficulty":4000000000,"rejected_share":0,"submitted_claim":0,"accepted_claim":0,"rejected_claim":0,"reported_hashrate":568302009,"effective_hashrate":340000000,"rigs":{"052-ETH3fi-192.168.100.56":{"ReportedHashrate":118429623,"ip":"192.168.100.56"},"eth5dii-192.168.100.87":{"ReportedHashrate":164980869,"ip":"192.168.100.87"},"eth6bii-192.168.100.99":{"ReportedHashrate":165219379,"ip":"192.168.100.99"},"ubuntu-192.168.100.102":{"ReportedHashrate":0,"ip":"192.168.100.102"},"ubuntu-192.168.100.208":{"ReportedHashrate":119672138,"ip":"192.168.100.208"}},"block_found":0,"time_period":2497296,"start_time":"2017-06-25T11:03:17.803651083+03:00"},"2497297":{"mined_share":78,"valid_share":78,"total_valid_difficulty":312000000000,"average_share_difficulty":4000000000,"rejected_share":0,"submitted_claim":0,"accepted_claim":0,"rejected_claim":0,"reported_hashrate":566436914
60a0604052600560608190527f302e312e31000000000000000000000000000000000000000000000000000000608090815262000040916002919062000172565b506006805460ff191690556101f4600b556000600c5560405160c0806200394f833981016040526060810151608082015160a08301515b5b5b5b5b60016005600086815b60209081029190910151600160a060020a031682528101919091526040016000908120805460ff19169215159290921790915560019060059086835b60209081029190910151600160a060020a031682528101919091526040016000908120805460ff1916921515929092179091556001906005908660025b60209081029190910151600160a060020a03908116835290820192909252604001600020805492151560ff199384161790556009805484151593169290921790915560038054858316600160a060020a03199182161790915560048054928516929091169190911790555b505050506200021c565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10620001b557805160ff1916838001178555620001e5565b82800160010185558215620001e5579182015b82811115620001e5578251825591602001919060010190620001c8565b5b50620001f4929150620001f8565b5090565b6200021991905b
var epoch0 = "0x0"
var fullSizeIn128Resultion0 = "0x7ffff1"
var branchDepth0 = "0xd"
var start0 = "0x0"
var numElems0 = "0x28"
var merkleNodes0 = ["0xff91d6ecba454fe34180df13740789480012b1b62922807ddc6eb4f1205a757d", "0xfd5e12506b0ecdb390a179a0be4265b5b697da5047802acc2d948f3a76d71bcf", "0x3b8934858b41f57b15237459253dcf46db083054660309932d73fc4aa413392b", "0x40a4365c008d561b3c837b6604820e31a32023d318f2986f52f2a57adbae948d", "0x6e6dcd2e0a0b17ab276d3229b14dc4d56d262d166480e29d58ec882ffb9fc9f7", "0x7491ca8d5609994c355d3a3c061c46702ee8d3651d208eb635b7e18c8b91ebee", "0x992a166d40c34cb0147dfdd29e932cd7882c9dd7289211c3cc0521196ea9572b", "0x31a9f89527771ee95c0fa7123c47a0320f25eaf53ef145606fb9e44db799ed45", "0x99c7a79a9c11d143228d637faf464b0fc415d613e1e1d3e0bc334ba67bd81d0c", "0x7d3730b5d4bb5ef4069b4fd04dbde11112b18cce5310eb7dbff37fdd7844bf52", "0x1b647a57722181f9400e500c81e5410747a9ec6ea9680dc75d9e07ebdbbcebce", "0x3f29eae9a2139b63aa7857f74d0ccef9b6cf8905eb54a337e428b94b056a749a", "0x3a8d9b75f311d298f94810b5dc67c4f41f
Saving workpool to disk...Done.
.....Cleaned 11 old works.
Have 2603 valid shares
Current timestamp: 0x591c5027
Shares with current timestamp: 2
..Truncating stat datas...
Done truncating stat.
..Saving active shares to disk...Done.
Saving stats to disk...Done.
Saving workpool to disk...Done.
{"long_window_duration":86400,"long_window_sample":{"2491275":{"mined_share":19,"valid_share":17,"total_valid_difficulty":74460000000,"average_share_difficulty":4380000000,"rejected_share":2,"submitted_claim":0,"accepted_claim":0,"rejected_claim":0,"reported_hashrate":371110830,"effective_hashrate":124100000,"rigs":{"his470ss":{"ReportedHashrate":169054112},"pcs7chan":{"ReportedHashrate":202056718}},"block_found":0,"time_period":2491275,"start_time":"2017-05-14T05:34:36.6338567-07:00"},"2491276":{"mined_share":86,"valid_share":86,"total_valid_difficulty":376680000000,"average_share_difficulty":4380000000,"rejected_share":0,"submitted_claim":0,"accepted_claim":0,"rejected_claim":0,"reported_hashrate":904721339,"effective_hashrate":627800000,"rigs":{"his470ss":{"ReportedHashrate":168914210},"his7chan":{"ReportedHashrate":188344526},"pcs7chan":{"ReportedHashrate":201960487},"pcsl1":{"ReportedHashrate":172561287},"pcsl2":{"ReportedHashrate":172940829}},"block_found":0,"time_period":2491276,"start_time":"2017-05-1
Microsoft Windows [Version 10.0.10240]
(c) 2015 Microsoft Corporation. All rights reserved.
C:\Users\sv>cd C:/Go/src/github.com/smartpool/smartpool-client
C:\Go\src\github.com\SmartPool\smartpool-client>git pull origin develop
From https://github.com/SmartPool/smartpool-client
* branch develop -> FETCH_HEAD
Already up-to-date.
Trong tru?ng h?p server b? restart, mình c?n ch?y l?i 2 chuong trình: 1 là Parity, 2 là SmartPool
1. Parity:
B?m phím windows r?i gõ "cmd" và ch?n "Command line prompt" d? m? chuong trình command line (nó là cái chuong trình màu den mà e v?n dùng) sau dó ch?y các l?nh sau:
1. cd C:\"Program Files"\Ethcore\Parity
2. parity.exe --chain classic --warp --cache-size 2048 --ui-no-validation --jsonrpc-apis web3,eth,net,parity,traces,rpc,parity_set
Sau dó a d? cho nó ch?y và d?ng t?t command line window này di.
2. SmartPool:
B?m phím windows r?i gõ "cmd" và ch?n "Command line prompt" d? m? chuong trình command line (nó là cái chuong trình màu den mà e v?n dùng) sau dó ch?y các l?nh sau:
1. cd C:\Go\src\github.com\smartpool\smartpool-client