Jump (mentally) back to the 1580s. Why? Because that is when Hideyoshi did his William the Conqueror impersonation - a complete land survey of the entire country. When it was finished, all the daimyos lands could be quantified and compared, meaning it was now possible to move them to different lands with more or less value. Land was graded on how much rice it could produce, measured in koku. One koku is about equal to 180 liters. In early Tokugawa times the country produced about 30 million koku of rice a year and the Shogunate directly controlled about 7 million of it. To be classified as a daimyo, you had to control at least 10,000 koku. Most daimyo paid their vassal samurai in koku or rice rather than land. This was mentioned above but it needs to be repeated because it had very important consequences.
A huge weakness of the Tokugawa Shogunate was its Confucian disdain for commerce. The Tokugawa economy was robust and grew substantially during the prolonged peace but as good Confucianists, the government regulated the economy but did their best to avoid taking part in it. As if such a thing were possible. Usually they just got screwed by it, especially the individual samurai. He had to sell his rice stipend to the rice merchants each year so that he would have money to buy other things ("a samurai does not live by rice alone" was not a Tokugawa era proverb, in fact, I just made it up). So what happens to poor Joe Samurai when there is a bumper harvest? He loses money because the price of rice plummets like a cat thrown into a lake wearing a necklace of stones. Ok, you say, so doesnt he make a lot of money when there is a famine? Maybe, but if there is a bad crop then there is less rice for the daimyo to use to pay all his retainers and so Mr. Joe Samurai probably gets less rice than usual. Thus he loses money but, unlike the peasants, he doesnt starve to death or sell his daughters into prostitution. Lucky guy.
So what is a robust economy? Well, thanks to sankin kotai the daimyo were required to spend a large portion of their income going back and forth to Edo. They also had to maintain a house appropriate to their status in Edo. Of course the daimyo had to take many of their samurai with them as well. All these daimyo and samurai living in one place naturally had to eat and buy clothing and the such, so they supported a large number of merchants and artisans and other hangers-on. Edo was soon one of the largest cities on the planet and also, therefore, one of the largest markets on the planet. But a market for what? Well, basically, the han competed with each other and over time many became famous for a product; pottery, iron tools, sugar, or a type of fish, for example. Many areas today are still famous for products going back to the Tokugawa period or earlier. Wajima, in Ishikawa-ken, is a good example. During the Tokugawa period, Wajima became a center of laquerware production and actively competed with one or two other areas for the laquerware market. While keeping an eye out for advances in production "technology," the Wajima laquer artists developed their own style. Today, Wajima-nuri (Wajima style laquerware) is famous throughout Japan. Each han has a similar story for some product. This specialization helped each han increase its income and also linked the han and the country together through trade. Several merchant houses became quite rich and had to occasionally donate money to the government. Why? Because by the 1860s, many samurai - including many daimyo - were deep in debt to merchants. Income was fairly static since it was based on taxing the rice harvest. Outflow was not static. Natural disasters, famines, and peasant rebellions all played their part in draining the Bakufu and han treasuries. Although technically samurai were not supposed to engage in the decadent night life of the cities, most did to some degree, patronizing the theater, drinking houses and the famous geisha houses. This, plus the expense of "keeping up with the Joness" and the occasional "voluntary" reduction in stipend, put many individual samurai deeply in debt. The expansion of the economy thus benefited the merchants but in the long run bankrupt the government and their samurai because they were dependent on the agricultural sector. Farmers and townsfolk were also living in poverty and during hard times - such as periods of famine or inflation - blew off some steam by rioting and destroying the homes and factories of merchants and landlords.