There's something screwy going on with the discount from Central Business Systems in regards to selling megastructures.
I had a binary system that had a CBS and a Planet killer in it. I had finished harvesting the system, so I sold them both (unfortunately, I do not remember which order i sold them in).
I ended up with the UI saying that I had 0 rocks, 0 silicon, and 0 of a few metals. I went to buy more, and nothing seemed to happen. Then I went into settings and changed from scientific to standard notation.
Turns out I had been buying negative amounts, or selling negative amounts, and now my money is stuck in the negatives.
I used a save editor to look at the save data, and my silicon, copper, iron, and platinum all have values of "Null" now; trying to buy or sell them does weird stuff.
Edit: Oh, also apparently my XP is null now, too, cuz I guess I was spending negative money trying to buy a negative amount of copper?
Edit 2: So, I went to the discord, and stumbled upon the commands list. I set all the null values to 1, which let me buy them again normally. Unfortunately, my XP is still stuck as null; the command to change level works, but the actual XP until next level up stays null. Another problem is that now I can't place any buildings or upgrade anything? When I click the upgrade button, it takes away my resources, but doesn't change anything. Wait, no. I just double checked before posting, and it just takes zooming out of the planet and zooming back in, and they're there. I don't know how it works yet with the terraformed planets.