I don't know how the economy system works right now, but were it possible to tie prices to available quantities?...
Everything is basically possible, Oolite is very flexible. The bigger problem is creating a working and balanced system that cannot be easily exploited. The main challenge with altering the prices based on quantities is naturally eliminating the player impact. Once upon a time there was a space trading game called FOFT (Federation of free traders). I was very exited about at that time since it had reacting markets and other stuff that Elite did not have. Too bad you never had to leave the station since the prices started climbing when you bought goods. Then you just sold them back at higher price, waited for the prices to drop again and so on. Fun for the first time, killed the game for me afterwards. I just could not not exploit the flaw.
Yes it's true, I didn't think about that, but there could be 'antidotes'.. Maybe a 'safety stock', that is a minimum quantity in stock under which the price increases. So if you buy and bring the quantity to this threshold, price would be higher for subsequent quantities bought. If you sell and stocks are under the 'safety' value, only the first tonnes you sell would get a very good price, after that price would be normalized. When you buy/sell all with 'enter' key, this should be taken into account (automatically buys/sells all until price change, then you can evaluate the situation). Right now, it's a bit weird for example how poor agricultural planets eat all those computers you sell them at high prices. I understand they could need some if their stocks are empty, but not if they have enough already for their needs. So even in importer planets, prices would normalize after that 'safety stock' is reached.
The station market could also 'remember' if you bought something from them recently, and forbid you to sell them back the same ware too soon. So you could 'keep buying', but not 'buy and sell' repeatedly the same ware at the same station in a given amount of time.
I think an economy rebalance can be done at different levels.
A basic level would be your OXP, if it's safe and simple maybe phkb could integrate it in his Smuggling OXP?
A second level would be keeping the current trade goods/planet types system but introducing more elaborate price calculations based on quantities, planet types etc. Looking at the trader-goods.plist, I realized that the base system doesn't allow for much flexibility
"peak_export" = 7; // Poor Ag
"peak_import" = 0; // Rich Ind
This basically makes it so, that there are only two kinds of economy. Being able to set the import/export value for each trade good and for each economy type would be a big improvement.
The third level would be to change radically the system, a bit along these lines
, making it more similar to Frontier Elite 2, with more trade goods, but different imports/exports for each planet (similarly to what Smugglers OXP does for illegal goods), that would be a lot of work though.