Hockey players’ scoring after learning their teammates’ pay could show the pitfalls of knowing what your coworkers make

We all want to rake in the big bucks—especially if that’s what our coworkers are pocketing.

So finds a new study from the Journal of Economic Behavior & Organization. To get a better idea of how salary transparency changes behavior, James Flynn, an economics Ph.D. candidate at the University of Colorado, revisited an event from 1990: when the Montreal Gazette published every National Hockey League player’s salary.

Turns out, those playing offense were paid more than those playing defense. The underpaid hockey players sprung into action, scoring significantly more goals in an attempt to boost their earnings. But by prioritizing offense, they focused less on the defense, allowing their competition to score more goals than they themselves were scoring. On the whole, team performance suffered.

As a result of feeling undervalued, Flynn suggests, the defensive players rushed to prioritize the visible, more measurable part of their job—scoring—even at the expense of their team.

This, he says, demonstrates that workers respond to perceived unfairness not by withholding effort—or, to use the term du jour, quiet quitting—but rather by shifting their effort to better align with what pays more.

In the season leading up to the 1990 salary disclosure, overall team payroll didn’t correlate with team performance at all. But in the season following it, “payroll and performance became immediately and permanently linked, with higher-paying teams consistently outperforming lower-paying ones,” Flynn wrote.

That relationship became less pronounced over time, which Flynn chalks up to owners’ likely decision to address the discrepancies. Underpaid players, he says, were also able to negotiate a new contract. But the study finds the pay-performance correlation has remained significant ever since.

Why workers love transparency—and bosses hate it

Keeping tight-lipped about income, whether or not your office is an ice rink, really only helps bosses and hurts underrepresented groups most. According to the National Women’s Law Center, a woman who begins a full-time career today is set to miss out on $417,400 during her 40-year career. If you’re a woman of color, you stand to lose out even more.

A wide body of research beyond Flynn’s backs up the tangible benefits of pay transparency. Researchers at the University of Utah’s Eccles School of Business tracked the wages and productivity of nearly 100,000 U.S. academics for twenty years and discovered that sharing salaries “substantially reduces the gender pay gap [and] other forms of pay inequity.”

When higher ed institutions increased wage transparency, the gender pay gap among academics dropped by up to 50%. The Utah researchers call the sudden reveal of pay information—like that at the Gazette—“transparency shocks,” which they say substantially alters pay.

Companies that pay their workers low wages, Flynn writes in his conclusion, “have a strong incentive to keep salary information secret, while higher-paying firms could benefit from policies designed to increase salary transparency.”

Should salaries be disclosed, or otherwise become public, short-changing firms are stuck with little choice but to pay up, lest their team crater entirely. Good thing, then, that more officials in states like Colorado and Washington and cities like New York all have voted for laws that would require job postings to list a salary range.

Paying up amid greater salary transparency will only stand to boost morale and team performance. On the ice in the early 1990s, for instance, Flynn writes that players who got a big raise upped their efforts to maximize performance for the whole team—not just themselves.

This story was originally featured on Fortune.com