Answer:
There is a general law to "help your poor brother" (Deuteronomy ch. 15). The amount of charity one should give is not specified, but the Sages have linked it to the command to tithe one's flock, as alluded to in Genesis (last verse of ch.28). So one-tenth of profits, cash or otherwise, are to be given to charity.