The Supreme Court handed down victory after victory to conservatives this term. It upheld Trump’s travel ban, dealt a blow to public-sector unions, allowed a bakery to discriminate against gay customers, and struck down a California law that required “crisis pregnancy centers” to disclose abortion options.

The coup de grâce was Justice Anthony Kennedy’s announcement of his retirement. Kennedy is the Court’s most moderate Republican appointee as well as the Court’s swing voter. His legacy includes cases that recognized same-sex marriage and advanced gay rights, limited the death penalty, and preserved the right to an abortion.

His successor will almost surely push the court even further to the right, and with 70-year-old Clarence Thomas as the oldest remaining conservative judge, the change could be generational.

Yet for all the anger at courts we will see from liberals in the coming years, a generation of conservative judicial opinions will strike many conservatives as a just comeuppance. During a period of liberal judicial ascendance — stretching roughly from the late 1930s to the early 1970s — courts weakened property rights, strengthened civil rights and voting rights, invented new rights for criminal defendants, protected pornographers and radicals, and created rights to abortion and contraception.

Conservatives during those years cried foul against “judicial activism,” which, they said, violated democratic principles. Liberals have begun to make the same argument since the advent of the conservative ascendancy over the past few decades. Conservatives and liberals might disagree about the outcomes of specific cases but they seem to agree that a society in which the most contentious social issues are determined by the views of unelected judges is not a healthy one.

Strip away the legal jargon and most Supreme Court cases are about balancing the interests of two sets of voters

The root of the problem is that while conservative and liberal justices agree that the Court should guard people’s rights against the whims of democratic majorities, they disagree about which rights need to be guarded, and to what extent. Conservatives emphasize the rights to property, the rights of religious minorities, and gun rights. Liberals put greater weight on the rights of minority groups and women. But there is more common ground than might appear.

Conservatives agree that women and minorities have legitimate interests in being treated fairly, and liberals agree that gun and property owners have rights as well. The problem comes with balancing rights when they conflict with each other and with broader social interests.

Consider, for example, the case involving the bakery. The Supreme Court handed a victory to the owner of Masterpiece Cakeshop, who had refused to sell a wedding cake to a same-sex couple because he disapproved of same-sex marriages on religious grounds. In his opinion for the majority, Justice Kennedy noted that the Court was required to reconcile two principles — the “rights and dignity of gay persons” and the freedom of speech and religion of people like Jack Phillips, the baker.

Whether you are liberal or conservative, you might ask yourself, How does the Court know which of these rights is entitled to more weight? The Court’s answer, “Trust us,” is increasingly out of place in an era of populist rejection of elite rule. A democratic system for protecting the rights of minorities is desperately needed.

But the current system of democracy — with-one-person-one-vote and majority rule — is the source of the problem. It is because the majority can, and frequently does, disregard the legitimate interests of the minority that the involvement of the Court seems to be necessary in the first place.

The innovation: a voting system that lets people express the intensity of their views

But we think there is a better way than judicial fiat to resolve these conflicts, one that relies on democratic principles. The solution is to redesign the voting system in a way that allows for majority rule based on the intensity of people’s interests and values, and the depths of their knowledge, rather than on simply the number of people who happen to fall on one side of an issue or the other.

Tyranny of the majority arises not when the majority and the minority feel equally strong about something. It arises when a majority with relatively weak interests disregards the legitimate, intensely held interests and values of the minority. A voting system that addresses this problem must incorporate the intensity or importance of an interest into the protocol for resolving political disputes. If that happened, the Supreme Court could take less of an activist role in protecting rights.

To explain this idea, we start with an example that is less contentious than race relations or gun rights. Imagine that a small town makes decisions by referendum, and the question for today is whether the town should buy a vacant lot and convert it into a public park.

Suppose that a minority of residents — say, 40 percent — would greatly benefit from a park. This minority includes the elderly, children, young parents, apartment dwellers, and others who desire some green space. Meanwhile, 60 percent are slightly opposed to the park. They don’t feel intensely, but think that tax dollars should probably be used for something else.

In a normal referendum, where everyone gets one vote, the park would likely be voted down. Yet from the standpoint of the community interest, the park should be built: It is greatly beneficial for a substantial minority of the community while imposing few costs on the majority. In a well-run town, it is possible that political leaders could arrange a deal, in which the minority agrees to support a public project desired by others in return for their votes for the park. But such deals are hard to arrange.

Now consider an alternative approach, which we call Quadratic Voting (QV). Every citizen in the town is endowed with an equal budget of “voice credits,” an artificial currency that can be exchanged for votes. When a referendum is held, people exchange their voice credits for votes, according to a quadratic formula: one vote costs one credit; two votes cost four credits; three votes cost nine credits; and so on. Unused credits remain in the budget for use in future referenda; the proposal wins if it earns a majority of votes.

In the case of the park, we might imagine that people in the (opposition) majority will either not vote or cast no more than one or two votes. If they care little about the park, they will want to conserve their voice credits for future referenda where their interests are at stake — for example, whether the town should install bike lanes, or fund accommodations for refugees.

The people in the intense minority will, in contrast, be willing to spend more credits to buy more votes, enabling them to outvote the majority if they care enough. They care more about the park than about bike lanes and other public projects.

The type of deal, normally arranged by political leaders behind closed doors, is made possible in a decentralized, transparent fashion through the voting process itself. QV is thus radically democratic, as well as using the radical (square root) to convert voice credits to votes.

Why the quadratic formula? The formula ensures that people vote in proportion to the intensity of their interests (or the depth of their knowledge about the issue being voted on). If Mary cares about the park twice as much as Raymond, Mary will cast (roughly) twice as many votes as Raymond does. If Mary benefits from the park and Raymond is harmed by it, then Mary will outvote Raymond. A population consisting of 50 Marys and 50 Raymonds will approve the park. So will a population of 40 Marys and 60 Raymonds.

But if enough people oppose the park — say, 90 Raymonds against 10 Marys — then the park will be voted down. The math used to justify this particular voting arrangement may be complex, but it captures the sense that people with strong values or preferences should be allowed to protect them, up to a point.

The upshot is that the quadratic formula ensures that, in our town, the collective well-being of the public is maximized through the voting system. Minorities will still lose referenda, but only when they are relatively small in terms of both preference intensity and numerousness.

What works in small-town referenda could also work for our most contentious national social issues

Now let us consider a more intense controversy. We’ll use gun control as our example, but we would say similar things about abortion rights, affirmative action, or religious freedom. Roughly speaking, most Americans favor some form of gun control, but an intense minority is opposed to it in nearly all forms. Complicating this picture, views about gun control vary geographically.

To keep things simple, let’s imagine a state or locality where a majority of gun control supporters routinely outvote the pro-gun minority. While we, like many readers, have our own views about gun control, what we are interested in examining is how a disagreement featuring this dynamic —an intense minority and a majority with relatively weak preferences —should be resolved fairly. One-person-one-vote means that the minority nearly always loses (save when it can form coalitions or stock courts with judges who share its views). If you don’t sympathize with the pro-gun minority, then substitute in one you do—political dissenters, or vegetarians, or a racial or ethnic group, or a religious minority.

In the case of QV, the minority has a chance to protect its interests. If the pro-gun minority is strong enough along two dimensions — the number of gun advocates (a minority but not too small a minority) and the intensity of their interest (very intense rather than mildly so) — they can prevail in a political system that relies on QV. They would not always win, and to win they will have to give up disproportionate influence on other issues, as they will spend many credits.

But they might be able to defeat the most extreme gun control measures while being forced to give in on more modest measures. And the same for racial, ethnic, and religious minorities, and other dissenting groups.

Return to Masterpiece Cakeshop. Speaking generally, should religious convictions and free-speech values yield to non-discrimination values? The only fair way to answer this question is to take seriously the importance of the interests on both sides of the question, and that requires a mechanism like QV for enabling people to express the intensity of their interests in a politically credible way.

Neither we nor the justices have any idea how deeply the litigants, or people in general, feel about these matters. Nor do we think there is a “correct” answer lurking in the constitution, whatever interpretive method one uses. Indeed, Justice Kennedy ended up ducking the whole question by pinning his holding on the behavior of the Colorado commission that initially heard the dispute; it failed, he wrote, to give Phillip’s claims “neutral and respectful consideration.” Kennedy carefully avoids saying how the case would have come out if it had done so.

Then it would be up to judges, justices, bureaucrats, or some other group of elites to decide whether someone’s religious commitments are more or less powerful than someone else’s right to dignity. But rather than depend on the speculation of government officials, society should resolve the dispute by giving ordinary people a means to express the intensity of their interests at stake — which they do by giving up influence over other political outcomes they care less about.

The notable feature of QV is that people can protect their most important values and interests through their votes; they need not rely on courts to the degree they do today. And because judicial protection of rights becomes less important, our reliance on fallible and often highly ideological judges becomes more limited, and a populist backlash against the judiciary becomes less likely, too.

There’s no reason to assume judges will protect vulnerable minority groups

Liberals who think that without judicial protection of rights, gay people and other vulnerable groups will be put at the mercy of the majority need to remember that courts, now staffed by Republican appointees, will likely interpret rights however they want—in favor of religious groups that disapprove of gay people, for instance. QV would allow us to escape this destructive cycle of judicial politics.

Liberals also need to keep in mind that virtually all of the great judicial victories of the “rights revolution” came after significant political action by minorities and their sympathizers, and were not simply imposed from above by the courts. A system of QV would have further empowered these movements, enabling them to achieve progress more quickly.

QV should also improve the larger democratic culture. Under a one-person-one-vote system, people in the numerical majority have little reason to debate with the people in the minority. The latter are simply shut out of the political process. With QV, people in the numerical majority know that they can be outvoted by the minority, and for that reason can’t afford to ignore them.

QV is a general idea, and it can be applied to elections of representatives as well as to referenda. People could be allowed to use their budget of voice credits to vote for both national and local candidates, as well as for any local referenda. The details can be complicated, and we refer those who are interested to our book, Radical Markets, and the research papers we have written on the topic. But a variety of systems — whether slates of national referenda on contentious issues or greater empowerment of politicians directly elected via QV with credits — could all ensure fair representation of minorities without excessive judicial intervention.

Making quadratic voting understandable is one key to its acceptance

One might wonder whether people can understand the QV algorithm. To investigate this question, we founded a startup that developed a platform that can be used for QV-based public opinion surveys. As the accompanying image shows, our app uses intuitive geometry rather than mathematical formulas to convey the basic idea behind QV. A bar at the top keeps track of the budget of voice credits, while the circles fill up, and the top bar draws down, at the quadratic rate as the survey respondent exchanges credits for votes.

Our colleagues tested the app on a sample of 4,850 people, and found that it successfully conveyed to respondents the nature of the tradeoffs they were making, especially among respondents with limited formal education. (Incidentally, respondents enjoyed using it.) Ballots would need to be designed along the same principles and the initial unfamiliarity could be overcome through a gradual process of citizens using QV for polling or rating online services.

QV is not a panacea — it could not have addressed Jim Crow because in that era African-Americans were out-and-out disenfranchised. QV, like other voting systems, must rely on judges to enforce the rules by which it works. And, unless the Constitution is amended, QV at present cannot fully replace judicial enforcement of rights. But as QV expands, the courts could allow more room for political determination of rights because their role as guardians of the minority would become less important.

Politics have become so bitter in part because many people believe that their deepest ideological values have been disregarded by an unelected judicial elite. Conservatives used to feel this most strongly, but liberals have got a taste of the feeling in recent years — and it may be about to hit them even harder. A voting system that channels conflicts over values back into democratic politics, while still protecting the minority from the majority, is badly needed.

Eric Posner is a professor at the University of Chicago Law School. Glen Weyl is a principal researcher at Microsoft Research New England and a visiting senior research scholar at Yale’s economics department and law school. They are authors of Radical Markets: Uprooting Capitalism and Democracy for a Just Society. Find Weyl on Twitter @glenweyl.

The Big Idea is Vox’s home for smart discussion of the most important issues and ideas in politics, science, and culture — typically by outside contributors. If you have an idea for a piece, pitch us at thebigidea@vox.com.