This would be A LOT of work to implement. The simple solution is to do crates how crates were meant to be done: have workers gather the materials (or go gather them yourself) and process the materials into crates. You were never meant to buy the mats from the market to make your profits. Slaves work for pennies and get tons of resources, don't trade those for instant satisfaction of the market because the market should never be a factor in crate making.
Thing is as long as you can sell mats on market without having adjustment on crate prices, 95% of them are not worth to craft at all. Why would I bother crafting mithril ingot crate, when it's a net loss of 3.7mil per crate at master 15 when I can just spend 0 time and sell the ingot on market.
Crates should be more money than market because it's more effort than simply selling on market. And yet now it's not the case for nearly all the crates except 10 of them.