This subject is one that would be familiar to anyone who has frequented game boards, or even who has just played the game through its various incarnations. In short, the economics within the game probably don't make a whole lot of sense in most worlds, but then the game isn't supposed to be Boardrooms and Bank Statements.
First, the most basic economic inconsitency. In D&D, the standard rules list equipment and even magic items with a particular price, usually in gold pieces, the standard currency (though some settings use different coins). The standard rules also say that when a player sells equipment, be it magical or mundane, they only get half-price. While one could say this represents new versus used equipment, for items of magic, they work exactly the same, new or old, and the rules hold true no matter how new an item actually is. The only exception is art objects or gems, which are almost currency in their own right. Now, obviously, this is a sort of artificial construct meant to encourage players to keep what they find (particularly when it is magical and very expensive) versus just selling everything and then buying what they want. There is a certain fun in making do with what you have or using something that you would never have sought out but have ended up with through exploration and adventure. The half price also signifies the lack of a need to wait for a buyer. You can pretty much sell immediately.
In games I've been in, we've modified the rules somewhat, taking away the immediacy in exchange for the possibility of making far more, like between 81 and 110% of the book price, if you are willing to wait. Sometimes the wait is a long time. This is probably more realistic, anyway. And there still is the option of half price if you don't want to wait (or can't).
Now, all of this discussion has avoided the huge glowing elephant in the room: magic. Magic changes things tremendously. With magic, particularly teleportation magic or teleportation circles, you can transport large amounts of goods tremendous distances in an instant, even faster than in the modern world with modern technology (discounting information and software, which is that fast). Not only would such magic seriously and radically alter whole economic systems, it would also render various other medieval staples of the D&D world rather useless. Things such as castles. To deal with this, there seems to be a built in assumption that magic is rare even as it is found everywhere. Truly, I think it is sometihng the game designers have sort of left players and DMs to figure out on their own. I mean, as I noted above, it is not supposed to be an economic simulation. It is an adventure game. And in adventures, it isn't heroic to sit around worrying about economic systems like the continental peasant in Monty Python's Holy Grail.
That's not to say that economics can't be worked into the game anyway. I've done it as a hook for adventure or even as the backbone of an entire campaign. That was my "libertarian librarian" campaign. Uther the pure, the libertarian librarian, sought knowledge in an effort to earn some coin and he hired adventurers to first protect him and then later, to help secure his new trade route. It was kind of fun also to mess around with such ideas in the fantasy world.
Recent discussions with Barefoot Bum now make me wonder what could be done with a medieval form of communism in a D&D world and what sort of adventures that might lead to. Yes, I know, even talking about Economics in D&D marks me as a gold-plated, certifiable uber-nerd.
Which brings me to the medieval system itself: feudalism. It seems to be the assumed system in many D&D worlds, yet such things as magic and monsters would seem to render feudalism nonsensical. But why argue realism in a world with elves and dragons - that ship has sailed! And yet it hasn't - you need internal, logical consistency. Without it, there is no suspension of disbelief. Getting back to Monty Python for a moment, I think it was John Cleese who said that about their sketches. He said they could be as wild and insane as you could imagine, so long as they had an internal consistency to them. For instance, if in the sketch everyone wore a dead fish on their head, that's fine, if everyone does it, then that's just "how it is." But then if someone comes into the sketch without a fish, you have to provide a logical explanation for it in the context of the sketch or you've blown it.
In designing my own homebrew world, I try for the internal consistencies. The main limiting factor seems to be time. I will discuss my own ways of dealing with that and running the game at a later time, probably Friday.
4 years ago