Omg that's perfect! I actually just tested it with a 20 sector run and got 1105 CO. The formula spits out a 1111 CO, it's not exact but pretty damn close!
The last thing we need to settle now is the RO and CO gain. My planet has 73k CO and 2k RO, now I imagine that I should have gotten at least 1 RO based on the formula. But all I got was pure CO.
I'll test more and crunch the split formula.
PS: I was trading with a player that has no RO.