~
GENEROSITY = SENT_MERITS - ceil(RECEIVED_MERITS / 2)
.....
IMO, the above metric for generosity doesn't reflect the true state of affairs cuz merit sources and those of them who receive more stuff are in privilege state. The relative (instead of absolute) number of sent merits would be more indicative:
GENEROSITY = 1 - ceil(RECEIVED_MERITS / 2 x SENT_MERITS)