Billionaire to graduating college students: My family is going to eliminate your student loans

It was a moment that the 45 million Americans who hold student loans can only dream of.

Robert F. Smith, the founder and CEO of the private equity firm Vista Equity Partners, came to Morehouse College to deliver a commencement address and receive an honorary degree -- a standard part of any college graduation ceremony.

But what the billionaire investor did next surprised even his own staff and the staff at Morehouse College, according to The Atlanta Journal-Constitution.

Smith announced that he and his family would set up a grant to pay off the nearly 400 graduating seniors' student loans. The total gift is estimated at $40 million, according to the AJC.

Smith had already pledged a $1.5 million gift to Morehouse, a historically black college located in Atlanta. According to Forbes, Smith has a net worth of $5 billion.

The student loan burden for graduating seniors has been increasing. Today, average debt at graduation stands at around $30,000, triple what it was in the early 1990s.

And many graduates simply can't afford to pay -- 3,000 borrowers default daily.

With total student loan debt nationwide now at whopping $1.5 trillion, politicians are moving to address the issue. Sen. Elizabeth Warren, a 2020 Democratic presidential candidate, has a proposal that would forgive $50,000 of debt for those with a household income of under $100,000.

Rep. Alexandria Ocasio-Cortez took to Twitter to comment on Smith's gift. She said the Morehouse class of 2019 would become a "natural experiment" -- the students could be followed to compare how their lives develop compared to their peers who graduate with debt.

But Ocasio-Cortez also said "people shouldn't be in a situation where they depend on a stranger's enormous act of charity."

-- CNBC's Annie Nova contributed to this report

WATCH: What would happen if the U.S. canceled student debt?

Click to show more