Bitcoin Forum
May 14, 2024, 09:36:39 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: [1]
1  Economy / Trading Discussion / Re: Flying to China to Arbitrage 100-500k on: December 03, 2013, 12:52:21 AM
So to arbitrage, I need to first sell my coins in China, then buy them back outside China.  If you know anything about any part of this plan that might help, please contribute.

To sell in China, I can either use an exchange like BTCChina, or sell for cash locally (localbitcoins?)

Once I have the CNY, I will either wire it to Hong Kong through a friend, or fly the cash to Hong Kong.  I'm not sure what the rules are in order to be able to just wire straight from a Chinese bank account to my US/UK bank account or bitstamp.  I'm a US citizen.

Once I have cash in Hong Kong, I will either wire it to Bitstamp, fly to someone anywhere in the world who will sell me a large volume of Bitcoins at the Bitstamp rate, or convert the cash to gold 1oz pandas and hoard them because they are pretty and shiny.

Thanks for any advice.

If you are planning to maintain a position in Bitcoin throughout the arbitrage, the method you are describing involves a risk that during the time required to wire the cash out of china, the price of Bitcoin on the exchange where you plan to make your final purchase may have increased past the price you bought at in china. Arbitrage by definition should involve a risk-free profit, rather than merely a decent chance of profit if the exchange rates don't change too much in the time required to complete the process. Your method allows you to gain USD essentially risk-free because the time required to buy Bitcoins on Bitstamp, send them to BTC china and sell them for CNY is pretty fast compared to the timescale of price changes. However when you wire out CNY, convert to USD and buy back Bitcoins, this could take a few days, Bitcoin price could change a lot, and it is conceivable that you end up with fewer Bitcoins than you started with.  

The best way to arbitrage without risking your Bitcoin or USD holdings would be to have a reserve of cash waiting on Bitstamp to purchase back the coins you sold at essentially the same time as you are selling the coins on BTCchina. So if coins on BTCchina are $1200 and coins on Bitstamp are $1000, you can have $120k and 100 coins on Bitstamp, send the 100 coins to BTCchina, then sell the coins on BTCchina for around $120k and at the same time buy $120k of bitcoins on Bitstamp. This leaves you with 20 more Bitcoins than you started with without any risk to USD or bitcoin holdings.(You could also have gained $20k without risking your original 100BTC, depending on whether your goal is a risk-free increase of USD or BTC) If you send everything to BTCchina you could make twice as much money if all you want to do is gain USD short-term without maintaining a BTC position, but if you want to keep your BTC position, you will have to wait days to get the cash moved back to Bitstamp and the risk efficiency is much lower with respect to your Bitcoin holdings because there is a possibility that your Bitcoin holdings will ultimately be reduced if the Bitstamp price increases substantially while you are waiting for your cash to transfer.
2  Bitcoin / Bitcoin Technical Support / Re: Need help extracting keys from wallet.dat on: November 22, 2013, 09:42:35 PM
Got my private key using the following script:

https://gist.github.com/msm595/7595164

ctrl+f on the output to find my address and corresponding private key(unencrypted), then use the import/export function on blockchain.info to sweep my coins to a new address.
3  Other / Beginners & Help / Re: simple script to generate address from private key on: November 22, 2013, 12:42:09 AM
This is very helpful, thanks! I am in the process of using this to recover some coins.
4  Bitcoin / Bitcoin Technical Support / Re: Need help extracting keys from wallet.dat on: November 21, 2013, 11:46:30 PM
Thanks to these two helpful articles:

https://en.bitcoin.it/wiki/Technical_background_of_Bitcoin_addresses

https://en.bitcoin.it/wiki/ECDSA

I have determined that my public keys are compressed, and that uncompressed keys starting with 0x04 are a thing of the past.

These are my next possible steps:

1. Determine how to decompress my public keys and continue which what I was doing before using the decompressed keys.

2. Extract all possible 32 byte private keys and generate public keys and hashes of those public keys until one of these hashes matches the hash for my address.

It occurs to me that if the runtime for going from 32 byte private key to hash of public address is small, as long as someone has the correct address, they should be able to essentially brute force an entire hard drive to find the private key that is associated with the address. That would be a cool recovery tool to have, it would be slow but sure to work. Also if the runtime is too long, you could start with byte sequences that have higher entropy, because byte sequences with low entropy are unlikely to be private keys.

Any recommendations are appreciated.
5  Bitcoin / Bitcoin Technical Support / Need help extracting keys from wallet.dat on: November 21, 2013, 07:39:57 PM
I am trying to recover a few coins from a wallet on a hard drive with a corrupt filesystem.(Yeah I know backups and all, this is from a while ago and I had planned to spend the balance on this wallet) The standard bitcointools such as dbdump.py will not read any wallet.dat that I construct with found hex bytes from my old wallet. So I moved on to a recovery method described by John Tobey as follows:

https://bitcointalk.org/index.php?topic=8274.msg126698#msg126698

Basically his Perl script searches for the regular expression: (/keyA(.{65})/sg) with the 65 characters representing public keys, and uses these public keys to find keypairs elsewhere in the file. If you know the address of your coins(which I do) you can use http://blockexplorer.com/q/addresstohash and http://blockexplorer.com/q/hashpubkey/ to determine which of the public keys you found correspond to the address. You can run your address through addresstohash, and then run hashpubkey on all the public keys you found in the file until a hashpubkey result matches the addresstohash result for your address.

My problem is that the file format has changed since John Tobey figured this stuff out. I don't see any instances of "keyA", instead I see "key!". Simple modifications didn't work and I started testing the methods with a fresh wallet.dat which seems to be in the same format as the wallet I need to recover. When I do this I can never find a public key that corresponds to my address. I have read that the public keys always start with "0x04" so I went as far as to make a python script that returns hashes for all instances of 65 bytes starting with 0x04. Not a single one of these hashes matches the result of addresstohash even for a fresh wallet.

This is where I realize I am stuck, it looks like either public keys are no longer 65 bytes starting with 0x04, the public key corresponding to my address is not even contained in the file, or I am missing something important.

Here is the python script I wrote to generate hashes for all possible public keys:

Quote
import hashlib
import array
import binascii
import re

f=open("C:\Users\user1\AppData\Roaming\Bitcoin\wallet.dat", "rb");
A=f.read()

hexstr=binascii.hexlify(A)

ms=re.findall('04.{128}',hexstr);
#ms=re.findall('key!(.{65})',A);

hlist=[];
pklist=[];

print len(ms)

for m in ms:

    pklist.append(m)
    mraw=binascii.unhexlify(m)
    dSHA2=hashlib.sha256(mraw).digest()
    h = hashlib.new('ripemd160')
    h.update(dSHA2)
    dR160=h.hexdigest()
    hlist.append(dR160)
        
refhash='60c3ce5d7343f66d2fabea37dcf749828facc7ca'
        
for h in hlist:
    print h

I have confirmed that instances of 65 bytes starting with 0x04 are returned and hashed correctly. Help would be appreciated, thanks!
6  Other / Beginners & Help / Re: Keynesian Altcoin Concept on: November 21, 2013, 03:56:43 AM
As I often explain to Keynesians..

you assume populations can grow forever and resources never run out!

I hate to break it to them but we live in a finite world and we just hit peak energy!

We are in a deflationary cycle and to survive it we will need a deflationary currency.

I am not a Keynesian, I just used the word to as a recognizable starting point for the idea that having a decentralized currency that regulates inflation/deflation rate could be desirable. Suppose you decide that some specific deflation rate is desirable rather than an uncontrolled deflationary process the system I am attempting to lay out serves that purpose just as well. If you are not a keynesian and you like deflation, do you think the uncontrolled deflation that comes with a fixed money supply(actually a money supply that decreases at an uncontrolled rate due to lost coins) is better than a fixed deflation rate? If you think so but don't have a good argument I have no choice but to accuse you of status quo bias in regards to the specific characteristics of Bitcoin.
7  Other / Beginners & Help / Keynesian Altcoin Concept on: November 21, 2013, 01:11:47 AM
A common criticism that economically inclined folks have leveled at Bitcoin is that it is prone to deflation or deflationary spirals. The Keynesian approach to this perceived problem is to increase or decrease money supply until inflation reaches a target rate. Individuals who believe this is necessary for a useful currency have argued that this is only possible with a centralized controller of the money supply.

It occurs to me that it might be possible to create a keynesian decentralized virtual currency somewhat like Bitcoin, where the difficulty adjusts to keep coins generating at a specified rate which is in turn adjusted based on information about coin value over time. The difference with this new currency would be that rather than having the target coin generation rate follow a predetermined schedule, the coin generation rate would be tied to coin purchasing power in some clever way. One way to achieve this would be for the protocol to intelligently scrape information about global exchange rates and try to regulate the average exchange rate between different world currencies to some constant. Alternatively purchasing power information is fed by miners somehow and there is a reward in coins depending on how close the information matches the average information being fed from around the world. This way there is an incentive to not skew the data, and it would be difficult to form a >50% group willing to pump inaccurate purchasing power information into the network.

Both kinds regulatory mechanisms listed above are rather naive and could result in the network being fooled by attackers into generating coins at strange rates.

[disclaimer1: I realize I am referring to a "distributed network" as being capable of various things, this is hypothetical for the sake of starting with conceptualization.]

A better mechanism starts with the concept of implied volatility. If the network could "sell" contracts relating to coins for coins to network participants, self-interested network participants will buy these derivatives or options contracts at different prices depending on their beliefs about the future vs current purchasing power of a coin.

A simple example(network issuing "bonds"): consider a contract where the network sells a fixed number of bonds for 1 coin with a 0.1 coin per year return, and some of bonds for 1 coin with a 0.09 coin per year return and so on down to arbitrarily small returns. If the coins are inflationary, say purchasing power is decreasing by 5% a year, participants will be willing to put many coins into the 0.1 coin return per year but much fewer coins in the 0.05 or lower return bonds(as they would rather spend the coins than buy a bond that loses value). If the coins are deflationary, users will be willing to put more coins in a lower return bonds. The network monitors the distribution of bond purchases at different prices and determined something about the expected future value of coins compared to their current value. If participants are buying up the bonds available at all return levels a deflationary state is implied, and the network decreases difficulty until the purchase rate of lower interest bonds starts to decrease, the network difficulty is basically adjusted with some kind of negative feedback control with respect to the deviation from a certain reference bond buying distribution that corresponds to the desired inflation rate.

Another way of implementing essentially the same feedback mechanism above is for the network to allow participants to pay coins for slightly decreased mining difficulty for a certain address. This creates similar incentives to the bond scenario, letting the network hold onto your coins in exchange for small returns in the form of more coins mined tells the network something about how the value of coins is changing over time depending on the equilibrium purchase rates of different lowered mining difficulties, and again the network can apply negative feedback to drive the equilibrium on "mining bond purchases" to a price which implies the desired inflation rate.

I believe that better solutions exists involving a more sophisticated set of derivative trades between participants and network, which would give the network much more reliable information about value projections of participants, allowing cleaner feedback on coin generation rate, along with providing mechanisms for eliminating coins. Assuming the participants are rational economic actors, these mechanisms would allow the network to regulate to a nearly constant coin value over time using only information derived from network activity.

What does everyone think? Is there economic sense to these ideas,(assuming the reader is a keynesian, for the sake of argument) and if so would it be possible to implement them in a distributed protocol?

[disclaimer2: I am not a keynesian, I do not claim inflation is desirable. What I am proposing are some top level details for a system that would allow for the network regulation of deflation/inflation rate. I used keynesian concepts to provide a familiar starting point for the discussion of this altcoin concept, with the keynesian example being special case of inflation/deflation regulation. Bitcoin does not regulate inflation/deflation and tends to undergo uncontrolled deflation due to slowly growing, fixed or diminishing money supply with an unknown amount of coins being lost per unit time. While I do not make keynesian claims, I do claim that an unargued preference for the specific money supply and deflationary characteristics of Bitcoin over say a controlled deflation rate of 5% a year is an example of status quo bias]



8  Other / Beginners & Help / Re: How to buy big amount of BTC on: November 20, 2013, 10:47:24 PM
https://coinbase.com/ is good if you are in the United States(in my opinion the counterparty risk is low). It takes a little while, but once you get verified you can purchase 50 BTC a day, so it would take a few days to purchase the 200+ you required. Other than that there are exchanges and localbitcoins.com. I would also be pretty scared to purchase 200+ BTC on an exchange.
Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!