This is hard to pin down since gains are always an eyeball thing with no known formula. But I've seen enough to be convinced something isn't right.
My suspicion is that gains penalties are being added, not multiplied. Specifically penalites for emerald dragon and gs. Say you have -20% from both dragon* and -20% from gs. This should all be applied multiplicatively, for .8*.8 = 64% gains. But it seems like the penalty is actually larger, possibly additive for -20% and -20% making it -40%. I strongly recommend reviewing this code and making sure *all* penalties *and* bonuses are multiplicative.
P.S. As this is primarily an emerald-dragon bug, and my kingdom is dragon immune, it's actually penalizing us for you to fix it. Picking war hero was in part the necessity to be immune to emeralds when the over-penalty comes into play against dwarves with maxed gs. Feel free to wait until eoa to fix it. ;)
(Unrelated bug report: there's nowhere in game other than the dragon creation page that tells you what the dragons do, and the guide is never trustworthy, so I actually have no idea whether emerald is -20% or -15%. Please have all dragon and ritual bonuses shown on the bottom of the dragon/ritual page, same as on the creation page - this would be so easy. And have the dragon page visible to everyone; simply show "we have no dragon started at this time" on it and then the aforementioned dragon info below it.)