Ripple Inc., a startup behind the XRP cryptocurrency, agreed to invest up to $50 million in MoneyGram International Inc. in a deal that stands to rank among the first crypto-based company investments in a major U.S. publicly listed firm.

Ripple agreed to buy $30 million worth of MoneyGram shares and warrants to buy stock at $4.10 a share, nearly triple the Monday closing price of $1.45 a share. The deal includes additional warrants for up to $20 million worth of additional newly issued stock, also at $4.10 a share, over the next two years at MoneyGram’s discretion.

The two companies signed a two-year agreement for MoneyGram to use XRP and a platform for XRP transfers called xRapid as a back-office channel for managing its settlement operations. The two companies began working together in 2018 when MoneyGram agreed to run a pilot program testing XRP. Today’s deal is an extension of that initial program.

“This deal is a major milestone for the entire industry,” said Brad Garlinghouse, Ripple’s chief executive.

It’s another sign that for all the volatility of the cryptocurrency sector, digital currencies like bitcoin have left their backers with considerable war chests and the ability to spend aggressively. Entrepreneur Justin Sun, for example, this month paid a record $4.57 million for a charity lunch with Warren Buffett.