I could be wrong, but I think the game just treats it as if you'd sold a building whose cost equals the number of hammers you'd wasted on the Wonder. In other words, divide by 4 (BUILDING_SALE_DIVISOR in GlobalDefines), plus whatever modifiers normally get added to building sales. Unfortunately, changing that value would also change regular building sales, so you can't really change only the wonders.