First of all, don't panic, your IOTAs are most probably safe. I will try to explain what has happened and go through the steps you can take to recover your balance. Just take the time to read and understand. It will seriously help you in the end. First a little more about why this happened.
How does an IOTA wallet work?
Contrary to what most people believe your IOTA wallet does *not* contain your IOTAs. Instead, your IOTAs are safely stored in one or more addresses in the Tangle. You can see your wallet as a browser that knows how to retrieve the balance of an address. To do that it contacts a so-called node, and asks it to find the balance of that address in the distributed ledger database that the Tangle actually is. To be able to retrieve your entire balance, the wallet will usually have to retrieve the balances of multiple addresses that belong to your wallet and adds them all up. The end result is displayed as your current balance.
Now here is an important thing: the wallet does not know at first how many and which addresses exactly to retrieve to accumulate your balance. The only starting point it has is the 81-character seed you provided when you logged into the wallet. This seed is the key that enables the wallet to always re-generate the addresses used by your wallet deterministically. Deterministically means that given the same seed it will always be able to generate the exact same sequence of addresses one by one. To determine your total accumulated balance the wallet will ask the node for each address balance in succession until the node indicates that an address cannot be found because it is not present in the Tangle. This indicates to the wallet that it has not generated/used that address before, so it can safely stop accumulating address balances. This fact is important to remember, because it will shortly explain why your balance is currently zero.
The wallet will generate addresses as needed in two important ways. First, and most visible, when you want to receive IOTAs in your wallet you will need to generate a new receive address and attach that to the Tangle. Addresses are not supposed to be re-used because the signing process used to spend funds from an address uses one-time signatures. Because of the one-time nature of the signing process the public key for that address gets partially exposed by every spend from the same address, opening it to a brute force attack. And since anyone that has the public key to an address can spend the funds in that address it's not very wise to open yourself up to such an attack. That's why the wallet tries to defend itself against such attacks by automatically moving the remaining funds after spending to a new address in the wallet.
So that is the second way in which the wallet will generate addresses. When you instruct it to send a certain amount of IOTAs to someone else's address what it will do is go through the known addresses in your wallet one by one, starting from the first, by generating the addresses in sequence from the seed. The wallet accumulates the amount of IOTAs it finds along the way on addresses with a non-zero balance, until it has accumulated enough IOTAs to cover the amount you want to send. The contents of the non-zero addresses it has accumulated in this way will be sent as a single transfer to the receiving address and (if there is a remainder) the remainder will be sent as a second transfer to a newly generated address in your wallet. This will cause the latter address to be attached to the Tangle, so it lives there now, and the wallet will be able to see it as in use already whenever it scans for your balance as outlined above. All addresses used as the input for the transaction will end up having a zero balance, so they are not likely to be re-used any more unless you make the mistake of not creating a new receive address but re-using a previous one.
It is important for the recovery process that you have an idea of how many addresses were in use before you 'lost' your balance (before the snapshot happened). For most people that will be up to one or two dozen addresses. But for people who used the wallet regularly before the snapshot happened that can easily go up in the hundreds. I personally have helped someone retrieve his balance who had 140 addresses in use in his wallet.
Why is my balance zero?
To understand what happened you need to know what happens when the IOTA foundation generates a new snapshot of the IOTA ledger database. This is done every now and then for maintenance reasons. The last snapshot was created on Friday September 22nd, 2017. One reason for taking a snapshot is that the Tangle is constantly expanding, and therefore taking up more and more memory. To help nodes in keeping the amount of memory they need for storing the database limited, the Tangle is pruned by removing the history of transactions. Remember that after every transaction you end up with no longer used addresses with an empty balance. The transactions that caused these only take up space and are no longer necessary for correct functioning of the nodes. There are even more ways that can cause zero balance transactions to occur, like when a wallet generates and attaches a new address to the Tangle. There are also transactions that are used as messages between systems and do not contain any balance.
So after a snapshot is taken the end result is a simple list of all addresses that contain a non-zero balance and their respective balances, and no history of how those balances happened is preserved on the nodes. By the way, this history *does* get preserved on so called perma-nodes, which will keep track of the entire history all the way back to the first transaction ever. But for most use cases this history is not necessary. It's only the non-zero end balances that are important, since they are the only ones that can be spent
Note that the snapshot process is such that any transactions that were not confirmed yet while the snapshot was being taken will be canceled and it will be as if the funds never left the wallet of the sender. So that means some transactions may have to be performed again once you have restored your wallet. A transaction from your wallet to Bitfinex that was canceled will have never left your wallet. A transaction from Bitfinex to your wallet that was canceled will have never left the Bitfinex wallet. Just send those transactions again when that happened. They should pose no problem.
Now, remember how the wallet will figure out its balance? It will ask a node to retrieve the balances of each address it generates in succession from the seed, starting with the first one, until it finds a non-existing address, which indicates that the wallet did not generate that address before. However, since the snapshot has removed all historical transactions the first address it checks will not be found in the tangle, and so the wallet stops scanning for balances immediately, because it thinks it has not generated that address yet, ultimately resulting in a zero accumulated balance.
So that's the reason you see a zero balance. The wallet simply stopped scanning for addresses with balances too soon, because it does not know that the snapshot process has removed the transaction history. This means that the remedy for finding your balance back is simple. Start re-generating and attaching your previously used receive addresses one by one. This will cause zero-balance transactions using that address to be connected to the tangle. Which means the wallet now can find the address in the Tangle and ask the node for the corresponding balance. In particular, you need to do this as many times as you had used addresses in the past, so that they can all be found in the Tangle again. To be sure, this can be a tedious process and it would have been nice if the wallet designers had included a command that allows you to tell it to generate the next X addresses until it finds one with a balance. But that is not the case at the moment, so there is no use in complaining right now. I am sure this feature will show up in a next incarnation of the wallet.
Why is the wallet still not able to find my balance?
The Sep 22nd snapshot process has done two additional maintenance tasks that may result in you still not being able to successfully retrieve your correct balance. First, since the implementation of the Proof of Work function (curl) has changed in August there was a need to transition balances to the use of the new curl implementation. A lot of people already did this transition as part of their upgrading their wallet from an older version to version 2.4.0. Since it turned out that there are people who managed to lose their seed and also many people who did not transition yet, the IOTA foundation has taken the precaution to remove those old-style addresses from the snapshot and has taken custody of them. They will shortly come up with a method for people who did not transition yet to access these funds. So if your previous wallet was from before version 2.4.0 you may fall into that category. I will explain the way to check for that further down.
Second, because it was found that quite a number of people had spent multiple times from the same address, thereby exposing their funds to being stolen, the IOTA foundation decided to take similar custody of those addresses so they are no longer vulnerable. That means if you accidentally spent from the same address more than once in the past, and this address was still holding a balance, you can retrieve those shortly when the foundation presents the method to reclaim them. I will update this document once the exact way to reclaim is known.
In both cases one or more of your address balances may still be 'missing' even after the wallet has re-generated the missing address in the Tangle. The balance of these addresses was moved to the IOTA foundation custody address. You can check for those addresses if you think that may be what has happened to them here:https://ipfs.io/ipfs/Qmeb4B5AEi5MWTreKPRtufBFRFWRVTpZkBpX6FeaXCAe3B
Allow for the page to load before searching as it is a huge list.
You just copy an address you want to find out about to the clipboard, and then use control-F and paste to search on that page. Make sure you only use the first 81 characters of the address, as the 9 character checksum is not present in this list.
If your address shows a category of KEY_REUSE in this list then you have executed more than one spend from that address and the balance is now in custody of the IOTA foundation until you reclaim it.
If your address shows a category of CURL_UNUSED then your address was not transitioned to the new curl implementation yet and the balance is also in custody of the IOTA foundation until you reclaim it.
For more details, see this announcement from the foundation:https://forum.iota.org/t/snapshot-public-validation-22-09-2017/4256
Why is the new wallet not working?
Some people have voice problems when upgrading to the latest wallet. Here is what could be the problems/causes:
First, make sure you upgrade to version 2.5.1 of the *desktop* wallet. You can safely skip 2.4.0 and 2.5.0 if you did not install those before. Note that I don't know the process for mobile versions of the wallet (Android, iOS), or even if they have been updated yet. You can find version 2.5.1 of the desktop wallet for Windows/Mac/Linux here:https://github.com/iotaledger/wallet/releases/
After installing you need to set up your wallet correctly. Notice that there is no longer a way to do a transition from old curl style addresses, since they have been removed from the tangle as described above. The transition dialog shown in many help documents and videos is therefore no longer present. What you need to do is go to Tools->Edit Node Configuration.
Make sure a Host node is selected. If you see 'Select Your Host' in the Host field, use the drop down to select one. Usually any one will do. However, keep in mind that a host may be temporarily offline, so if after selecting one the wallet indicates No Connection you may want to select another Host. My experience shows that the bitfinex and iotatoken.nl hosts are pretty reliable and fast.
Make sure that Min Weight Magnitude is set to 14. Higher values should be no problem but will just cause the Proof of Work to take longer unnecessarily.
Finally, you see a field that says Curl Implementation. The default is WebGL, which is a new setting that allows the wallet to use your graphics card to do the Proof of Work, thereby speeding up the process. However, some people will find that they get an Invalid Transaction Hash when they use this setting. The solutions for that are to either select CCURL instead, or to follow the instructions found in this link to make sure the wallet uses the correct graphics card:https://steemit.com/iota/@tector/iota-light-wallet-2-5-1-dealing-with-invalid-transaction-hash
Note that it may be necessary to close and restart the wallet after changing any of those settings. I would do that just to be sure the changes ‘stick’.
Okay, I successfully connected to a Host node. Now what?
Well, now you use your seed to log into the wallet, so you can start re-generating and attaching receive addresses.
Make absolutely sure that you are using the correct seed. Any typo in the seed will result in a different wallet, and trying to find your balance in there is not going to work, obviously.
There is a helpful checksum field next to the field where you can enter your seed. The wallet will tell you if your seed is too short or too long. And if you have entered exactly 81 characters it will show you a 3 character checksum that should always be the same. It will allow you to very quickly see if you made a typo, since any typo will result in a different checksum.
If you know roughly how many addresses you used to have in your wallet, just go ahead and re-generate at least that amount of new receive addresses (detailed steps below). Along the way, usually towards the end, you should see your balance increasing. If your balance becomes non-zero that is a clue that you are definitely in your own wallet with the correct seed. If you cannot seem to get the entire balance you may either need to generate even more addresses, or some of your funds were taken into custody by the IOTA foundation for the reasons described above. In that case you will have to check the addresses which you think should contain a non-zero balance against the snapshot list. And if you find them there you will have to reclaim them after the reclaim method has been made available.
Making double sure that you are using the correct wallet can be easily done by using Bitfinex's withdraw history. Most probably your first and/or last transaction was one that was a withdrawal from Bitfinex, unless someone else sent you some IOTA. But if you ever used Bitfinex here is a tip:
Log into the Bitfinex site, and go to the Withdraw page. Find any (but preferably the *oldest*) withdrawal you did towards an address in the *current* wallet. Disregard withdrawals to other wallets. Click on the selected Withdrawal and Bitfinex will show you the wallet address that you withdrew to. Now when you start re-generating addresses see if this address is one of those that is being generated. If it is you can be absolutely sure you are in the correct wallet and it's just a matter of regenerating more addresses to restore your balance. The only hitch in this case could be the IOTA foundation taking custody of one or more balances for the earlier described reasons.
The other helpful function of the Bitfinex withdrawal history is that the most recent transfer to your wallet should probably still be there. Unless you have spent those funds afterwards. That means that you can check the address of the most recent withdrawal against the snapshot list and see if it still contains a balance. If it does, that address balance should be available in your wallet. Just keep generating addresses until you reach that address.
How do I re-generate and attach addresses?
After logging into the wallet you click on the Receive section. It will show you a new receive address. Now click Attach To Tangle. It will show ‘Attaching to Tangle’ for a while. Just wait for that to complete. If it takes too long you could try a different, faster node as outlined above. Once it says ‘Address Attached’ click that. It will now say ‘Generate New Address’. Click that again. That will cause the next address to be generated and it will show ‘Attaching to Tangle’ again. Keep repeating this loop until you have recovered all your addresses. Addresses can be in pending state for a while, but you can just continue generating addresses in the mean time.
You can click the History section to see how many and which addresses you have generated so far.
I hope this was helpful
Enjoy IOTA, let’s make it a success!