...and this is for MINES only!
EITHER:
1] the exact cost of materials to build it to lvl 1 (not some TEENY-WEENY % of tools/marble -- that's not even worth the trouble to pull down to get back)
OR
2] if you have upgraded your mine to lvl 2 or 3, pulling it down and rebuilding SHOULD keep it at the SAME level it was before being pulled down (without extra cost to level up again).
IMHO, of course...