There are several assumptions involved in the computation of consumer and producer surpluses as a measure of the subjective gains from trade:
1. Value scales exist for each technical unit of the good traded, e.g., gallons of gasoline.
2. We can acquire information about the range of such value scales in traders minds that are not demonstrated by them in action.
3. Money is a measure of value, e.g., $10 = 1 util.
4. The value of money is the same across all traders.
5. If integration is used, value scales must be complete so that demand curves are smooth and continuous.
Take a look at chapter four of Murray Rothbard’s book, Man, Economy, and State: