Trustless SNT Selling Contract

Words
1416
Reading
7 min
Listen
Play
9y

https://www.reddit.com/r/ethtrader/comments/6ip2vg/trustless_snt_selling_contract/
https://twitter.com/VitalikButerin

Price now below 2x ICO!
544,000 / 694,000 SNT Left
Missed out on the Status ICO? Didn't use my ICO Buyer Contract and couldn't get in on your own? No hard feelings, I've still got your back! I purchased over 694,000 SNT with the Status ICO's "proxyPayment" function to directly place them in my new SNT Selling Smart Contract! Because SNT won't be tradeable for 1 week, my smart contract is currently the only trustless way to buy SNT!
But how can my contract sell SNT when it isn't transferable? It works like a bank, securely holding your purchased SNT until it becomes withdrawable 1 week from now. It's the same logic used in my ICO Buyer Contract. Once tokens are tradeable, you can withdraw your purchase by simply sending my contract a 0 ETH transaction!
But if there's only 694,000 SNT in my contract, how can I make sure everyone gets a chance to buy some? My contract uses a Dutch Auction model, starting out on block 3,910,001 (i.e. when this post was made) selling at 2 SNT/ETH and raising that by 2 SNT/ETH every block (so around 450 SNT/ETH per hour). It'll take almost a day to reach the ICO price, so there should be plenty of time to get in before a whale gobbles it all up! You can check the current Block Number on Etherscan and calculate the current SNT/ETH ratio as 2*(block - 3910000). Here's a useful table:
Block Number Approximate Time (UTC) SNT/ETH
̶ ̶3̶9̶1̶0̶0̶0̶0̶ ̶ ̶ ̶ ̶ ̶ ̶ ̶ ̶ ̶ ̶J̶u̶n̶e̶ ̶2̶1̶s̶t̶ ̶-̶ ̶2̶1̶:̶4̶5̶ ̶ ̶ ̶ ̶ ̶ ̶ ̶ ̶ ̶ ̶ ̶ ̶0̶
̶ ̶3̶9̶1̶0̶5̶0̶0̶ ̶ ̶ ̶ ̶ ̶ ̶ ̶ ̶ ̶ ̶J̶u̶n̶e̶ ̶2̶1̶s̶t̶ ̶-̶ ̶2̶3̶:̶5̶9̶ ̶ ̶ ̶ ̶ ̶ ̶ ̶ ̶ ̶1̶0̶0̶0̶
̶ ̶3̶9̶1̶1̶0̶0̶0̶ ̶ ̶ ̶ ̶ ̶ ̶ ̶ ̶ ̶ ̶J̶u̶n̶e̶ ̶2̶2̶n̶d̶ ̶-̶ ̶0̶2̶:̶1̶5̶ ̶ ̶ ̶ ̶ ̶ ̶ ̶ ̶ ̶2̶0̶0̶0̶
̶ ̶3̶9̶1̶1̶0̶0̶0̶ ̶ ̶ ̶ ̶ ̶ ̶ ̶ ̶ ̶ ̶J̶u̶n̶e̶ ̶2̶2̶n̶d̶ ̶-̶ ̶0̶2̶:̶1̶5̶ ̶ ̶ ̶ ̶ ̶ ̶ ̶ ̶ ̶2̶0̶0̶0̶
̶ ̶3̶9̶1̶1̶5̶0̶0̶ ̶ ̶ ̶ ̶ ̶ ̶ ̶ ̶ ̶ ̶J̶u̶n̶e̶ ̶2̶2̶n̶d̶ ̶-̶ ̶0̶4̶:̶3̶0̶ ̶ ̶ ̶ ̶ ̶ ̶ ̶ ̶ ̶3̶0̶0̶0̶
̶ ̶3̶9̶1̶2̶0̶0̶0̶ ̶ ̶ ̶ ̶ ̶ ̶ ̶ ̶ ̶ ̶J̶u̶n̶e̶ ̶2̶2̶n̶d̶ ̶-̶ ̶0̶6̶:̶4̶5̶ ̶ ̶ ̶ ̶ ̶ ̶ ̶ ̶ ̶4̶0̶0̶0̶
̶ ̶3̶9̶1̶2̶5̶0̶0̶ ̶ ̶ ̶ ̶ ̶ ̶ ̶ ̶ ̶ ̶J̶u̶n̶e̶ ̶2̶2̶n̶d̶ ̶-̶ ̶0̶9̶:̶0̶0̶ ̶ ̶ ̶ ̶ ̶ ̶ ̶ ̶ ̶5̶0̶0̶0̶ ̶(̶2̶x̶ ̶I̶C̶O̶ ̶p̶r̶i̶c̶e̶)̶
3913000 June 22nd - 11:15 6000
3913500 June 22nd - 13:30 7000
3914000 June 22nd - 15:45 8000
3914500 June 22nd - 18:00 9000
3915000 June 22nd - 20:15 10000 (ICO price)
3915500 June 22nd - 22:30 11000 (sub-ICO)
... ... ...
Current UTC Time
To buy SNT from my contract, all you have to do is wait until the time corresponding to the price you're willing to pay and send my contract the amount of ETH you want to buy SNT with! You can then withdraw your SNT at any time after they become tradeable (Jun-28-2017 11:45:21 AM UTC) by sending my contract 0 ETH.
You can make multiple purchases and my contract will just add them to your balance, so I encourage you to test out my contract with a small amount of ETH first. You can check your balance (in SNT Wei) at any time by plugging the address you purchased from into the Read Contract section on Etherscan. This tells you the amount your address will be able to withdraw when SNT becomes tradeable.
I recommend waiting until other devs (or you!) have had a chance to look over my contract before sending it ETH. I'm placing a 3 ETH bug bounty on this one. Let me know in the comments if you have any questions or need clarification!
I also recommend using 80,000 gas and a gas price >50 GWei due to the DDoS caused by the Status ICO. And please only send ETH from a wallet you own the private keys to; sending from an exchange will likely lose you your ETH!
I've made an example transaction, purchasing 5012 SNT with 1 ETH at block 3912506. You can see in the Read Contract section on Etherscan that my address' balance has gone up to 5.012e21 SNT Wei, which is 5012 SNT.
Contract Address: 0xea30d20bd3a5b57c1fc8beb81adc1f3d93dbab71
Source Code: https://etherscan.io/address/0xea30d20bd3a5b57c1fc8beb81adc1f3d93dbab71#code
Edit: Why the downvotes? :(
Edit2: Thanks to the devs who examined my contract and to my contract's first user!


지금은 2 배 ICO 아래의 가격!
544,000 / 694,000 SNT 왼쪽
상태 ICO 놓쳤다? 사용하지 않은 내 ICO 구매자가 계약을 하고 자신의 얻을 수 있을까? 어떤 나쁜 감정은 아직도 허리가있어! 내가 직접 내 새에 배치하는 상태로 694,000 SNT를 통해 ICO의 "proxyPayment"기능을 구입 SNT 판매 스마트 계약! SNT 1 주일 동안 거래 가능한 수 없기 때문에, 내 스마트 계약은 현재 SNT를 살 수있는 유일한 신용이없는 방법입니다!
이 양도 할 수 없습니다 때 어떻게 내 계약은 SNT을 판매 할 수 있습니까? 그것은 지금부터 1 인출 일주일이 될 때까지 안전하게 구매 SNT를 들고 은행처럼 작동합니다. 그것은에서 사용되는 동일한 논리를 내 ICO 구매자가 계약. 토큰이 거래 가능한 일단, 당신은 단순히 내 계약 0 ETH 트랜잭션을 전송하여 구매를 철회 할 수 있습니다!
단지 694,000 SNT 내 계약서에있을 경우에, 어떻게 모든 사람이 어떤을 구입할 수있는 기회를 얻을 수 있는가? 내 계약은 사용 네덜란드 경매 모델을 2 SNT / ETH에서 판매하는 블록 3910001 (즉,이 게시물이 만들어진 경우)에 밖으로 시작하고 제기, 그 2 SNT / ETH 모든 블록 (시간당 그래서 약 450 SNT / ETH)에 의해. 그것은 ICO 가격에 도달하기 위해 거의 하루에 걸릴거야, 그래서 모든 걸 먹는다 고래 전에 얻을 수있는 충분한 시간이 있어야한다! 당신은 확인할 수 있습니다 Etherscan에 현재 블록 번호 와 같은 현재 SNT / ETH 비율을 계산 2 * (블록 - 3910000) . 여기에 유용한 표입니다 :
Block Number Approximate Time (UTC) SNT/ETH
̶ ̶3̶9̶1̶0̶0̶0̶0̶ ̶ ̶ ̶ ̶ ̶ ̶ ̶ ̶ ̶ ̶J̶u̶n̶e̶ ̶2̶1̶s̶t̶ ̶-̶ ̶2̶1̶:̶4̶5̶ ̶ ̶ ̶ ̶ ̶ ̶ ̶ ̶ ̶ ̶ ̶ ̶0̶
̶ ̶3̶9̶1̶0̶5̶0̶0̶ ̶ ̶ ̶ ̶ ̶ ̶ ̶ ̶ ̶ ̶J̶u̶n̶e̶ ̶2̶1̶s̶t̶ ̶-̶ ̶2̶3̶:̶5̶9̶ ̶ ̶ ̶ ̶ ̶ ̶ ̶ ̶ ̶1̶0̶0̶0̶
̶ ̶3̶9̶1̶1̶0̶0̶0̶ ̶ ̶ ̶ ̶ ̶ ̶ ̶ ̶ ̶ ̶J̶u̶n̶e̶ ̶2̶2̶n̶d̶ ̶-̶ ̶0̶2̶:̶1̶5̶ ̶ ̶ ̶ ̶ ̶ ̶ ̶ ̶ ̶2̶0̶0̶0̶
̶ ̶3̶9̶1̶1̶0̶0̶0̶ ̶ ̶ ̶ ̶ ̶ ̶ ̶ ̶ ̶ ̶J̶u̶n̶e̶ ̶2̶2̶n̶d̶ ̶-̶ ̶0̶2̶:̶1̶5̶ ̶ ̶ ̶ ̶ ̶ ̶ ̶ ̶ ̶2̶0̶0̶0̶
̶ ̶3̶9̶1̶1̶5̶0̶0̶ ̶ ̶ ̶ ̶ ̶ ̶ ̶ ̶ ̶ ̶J̶u̶n̶e̶ ̶2̶2̶n̶d̶ ̶-̶ ̶0̶4̶:̶3̶0̶ ̶ ̶ ̶ ̶ ̶ ̶ ̶ ̶ ̶3̶0̶0̶0̶
̶ ̶3̶9̶1̶2̶0̶0̶0̶ ̶ ̶ ̶ ̶ ̶ ̶ ̶ ̶ ̶ ̶J̶u̶n̶e̶ ̶2̶2̶n̶d̶ ̶-̶ ̶0̶6̶:̶4̶5̶ ̶ ̶ ̶ ̶ ̶ ̶ ̶ ̶ ̶4̶0̶0̶0̶
̶ ̶3̶9̶1̶2̶5̶0̶0̶ ̶ ̶ ̶ ̶ ̶ ̶ ̶ ̶ ̶ ̶J̶u̶n̶e̶ ̶2̶2̶n̶d̶ ̶-̶ ̶0̶9̶:̶0̶0̶ ̶ ̶ ̶ ̶ ̶ ̶ ̶ ̶ ̶5̶0̶0̶0̶ ̶(̶2̶x̶ ̶I̶C̶O̶ ̶p̶r̶i̶c̶e̶)̶
3913000 June 22nd - 11:15 6000
3913500 June 22nd - 13:30 7000
3914000 June 22nd - 15:45 8000
3914500 June 22nd - 18:00 9000
3915000 June 22nd - 20:15 10000 (ICO price)
3915500 June 22nd - 22:30 11000 (sub-ICO)
... ... ...
현재 UTC 시간
시간은 당신이 지불하고 내 계약 당신이 SNT를 구입하려는 ETH의 양을 전송하고자하는 가격에 해당하는 때까지 내 계약을 SNT를 구입하기 위해 당신이 할 일은 기다려야한다! 그들이 내 계약 0 ETH로 보내기 (쥰 28-2017 오전 11시 45분 21초의 UTC) 거래 가능한 수 없게 된 경우는 언제든지 SNT를 철회 할 수 있습니다.
여러 구매할 수 있습니다 내 계약은 당신의 균형에 추가됩니다, 그래서 당신이 먼저 ETH 소량의 내 계약을 테스트하는 것이 좋습니다. 당신은 당신이로에서 구입 한 주소를 연결하여 언제든지 (SNT 웨이에서) 당신의 잔액을 확인할 수 있습니다 Etherscan에 읽기 계약 섹션을. 이렇게하면 주소가 SNT이 거래 가능한 될 때 인출 할 수있는 금액을 말한다.
나는 때까지 기다리는 것이 좋습니다 다른 DEVS (또는!) ETH를 보내기 전에 내 계약을 통해 볼 수있는 기회가 있었다. 나는이 하나에 3 ETH 버그 현상금을 배치하고있다. 당신이 어떤 질문이나 설명이 필요한 경우 나 댓글에 알려 보자!
또한 사용하는 것이 좋습니다 80,000 가스와 가스 가격> 50 GWei을 인해 상태 ICO에 의한 DDoS 공격에. 그리고 제발 만이 개인 키에 대한 자신의 지갑에서 ETH를 보내 ; 교환에서 보내는 것은 가능성이 당신에게 당신의 ETH을 잃게됩니다!
내가 만든 것 , 예를 들어 트랜잭션을 당신은에서 볼 수 3912506. 블록에서 1 ETH와 5012 SNT를 구입 Etherscan에 읽기 계약 섹션 것을 내 주소 '균형이 5012 SNT입니다 5.012e21 SNT 웨이, 최대왔다.
계약 주소 : 0xea30d20bd3a5b57c1fc8beb81adc1f3d93dbab71
소스 코드 : https://etherscan.io/address/0xea30d20bd3a5b57c1fc8beb81adc1f3d93dbab71#code
편집 : 왜 downvotes? :(
EDIT2 : 감사 의 devs에 내 계약을 검토 하고에 내 계약의 첫 번째 사용자!