Settlements with two of Canada’s biggest banks, TD Bank and Royal Bank of Canada, highlight the value of cooperating with regulators — which, in this case, saved each bank a couple million.

On Friday, an Ontario Securities Commission (OSC) hearing panel approved a pair of settlement agreements with the two big banks concerning allegations that their foreign exchange (FX) traders inappropriately shared confidential client information with other traders in online chatrooms.

Under the settlements, TD is making a voluntary payment of $9.3 million, and RBC is making a voluntary payment of $13.55 million.

The difference between the two amounts partially reflects RBC’s higher revenues from FX trading. But TD Bank received a 30% discount on its penalty due to its cooperation with the regulators, whereas RBC’s penalty was discounted only by 12% for its cooperation.

The settlement agreements set out how the regulators arrived at the calculation of these payments.

In both cases, there’s no specific violation of securities law alleged, and the settlements note that it’s not possible to try to quantify the benefit that the banks received from their misconduct, so no disgorgement was ordered.

The payments were then calculated as 10% of the revenue that the banks earned during the period that the misconduct was ongoing (from 2011 to 2013).

In RBC’s case, that amounted to $12.4 million, based on $124 million in revenue for the period. For TD, it was $10.3 million.

In both cases, as a general deterrent, the regulator added $1 million per year for each year that the misconduct took place. That brought RBC’s total to $15.4 million, and TD’s to $13.3 million.

The OSC then applied discounts from those amounts.

In RBC’s case, the settlement said that OSC “Staff consider that the early settlement during this investigation by the respondent merits a 12% discount,” which brought the bank’s payment to $13.55 million.

For TD, the OSC granted a 30% discount, citing “exemplary cooperation during this investigation as well as the early settlement” as warranting a “significant discount,” which brought the bank’s payment down to $9.3 million.

Had TD received only a 12% discount, its penalty would have been about $11.7 million.

Conversely, a 30% discount for RBC would have brought its payment down to about $10.7 million.