It seems that the maximum order size my yield-generator provides is limited by the maximum balance in any one mix depth level. Is this correct? I. e., if I have 1 BTC in the wallet and use the default mix levels setting of 5, it may happen (in the worst case) that only 0.2 BTC are available for any one order. Is there a way to get around that restriction? If I do not care too much about my own privacy (as a market maker) and want to increase the provided liquidity of my bot, can I somehow specify that I want certain mix levels to be used together in orders? I tried lowering the mix depth setting in yield-generator.py, but it only had the effect that coins in lower levels of my wallet were not seen at all.
Also, what happens if coins on level 4 (the lowest configured level) are used in an order? Will they drop to level 5 and be completely useless for the bot, or will they stay at the minimum level forever?
Perhaps a reminder of the point of mixing depths. Merged transaction inputs are damaging to privacy because they provide evidence of common ownership. Each mixing depth is a different identity, coins are never merged in the same transaction across mixing depths, but may be merged within mixing depths. Coins move between mixing depths through coinjoins. A change output stays in the same mixing depth. This prevents the situation where a change output is merged with a coinjoin output in a later transaction, which would render the coinjoin easily unmixable.
If you wanted to make maximum profit above all else, you could recode the bot to not bother with mixing depths. However when you come to do deals with taker bots, they look back in the blockchain to see if there's evidence of you ruining privacy like that. You may find they are unwilling to trade with you, after all they're paying money to you to improve their privacy and there's no point if you'll just undo the mixing.
I haven't yet coded this feature of the taker looking backwards in the blockchain, but it shouldn't be too difficult. If somebody recoded their bot it would motivate me to move that feature up my to-do list.
If your coins are coinjoined from the lowest level, they will wrap around and end up in the highest level. So they will always be available.
If you want to increase your max amount you could move all your coins back to level zero (use sendpayment.py with amount=0 to sweep) and set the max mixing depth to 2 or 3 instead of 5.
Another thing you could do is recode the algorithm. A market maker can announce many orders (thats what the order ID parameter is for), you could write it to make mixing levels with smaller amounts still be announced, possibly with slightly smaller fees to incentivize takers to coinjoin them and move the coins into the larger mixing depth to make it even larger. In other words, make taker's incentivized to keep your coins clumped together in one mixing depth.
Lastly, to increase liquidity you could simply buy more bitcoins and deposit them into the bot. After all, they're quite useful now, you can earn an income with them with very low risk.
In the future there will be coinjoins with many output sizes, for making the
sendmany command with coinjoin. In those transactions a market maker could spend from many mixing depths at once as long as the amounts do not lead to trivial unmixing.