Stocks have surged higher over the past year-and-a-half, and the S&P 500 index is firmly in a bull market that began in October 2022. Despite the run-up in the broader market index, excellent investing opportunities exist today.

Block (SQ -0.13%) is one stock that is an intriguing opportunity for investors. The company is improving its efficiency and gross profit, and has made solid progress on these goals early this year. However, federal prosecutors are also investigating alleged compliance failures at Cash App and Square. If you're thinking of buying Block stock, consider the following first.

1. Block posted its best quarterly profit ever

Last year, CEO Jack Dorsey announced Block's goal to reach the "rule of 40" target by 2026. The goal is for Block to produce sustainable profits and profit margins, with 40 equaling the sum of its gross profit growth rate plus the adjusted operating margin. Dorsey told investors that Block would cap its number of employees at 12,000 "until we feel the growth of the business has meaningfully outpaced the growth of the company."

Block has made solid progress toward its goals. In the first quarter, the fintech announced net income based on generally accepted accounting principles (GAAP) of $475 million, the company's best quarterly net income since going public in 2015.

SQ Net Income (Quarterly) Chart

SQ Net Income (Quarterly) data by YCharts

During the quarter, Block grew its gross profit by 22% year over year, with Cash App (25% growth) and Square (19% growth) contributing to its solid performance. The company made good progress on increasing engagement with banking products through the Cash App and saw solid growth in its buy now, pay later offering, Afterpay.

The Cash App had 57 million monthly transacting actives (a Cash App account with at least one financial transaction using any product or service within Cash App), up 6% from last year, while inflows increased 17%. Meanwhile, Afterpay's nearly $7 billion gross merchant volume increased by 25% from last year.

2. Bitcoin is a big part of Block's future plans

In 2018, Block first offered Bitcoin on its Cash App platform, allowing customers to buy, hold, withdraw, or sell Bitcoin.

Since then, the company has expanded how customers can obtain Bitcoin, allowing customers to round up transactions and convert that spare change into Bitcoin or convert a percentage of direct deposits into Bitcoin with zero fees. It also recently launched a feature that could allow sellers to convert up to 10% of their daily sales into Bitcoin.

Bitcoin is becoming a growing part of Block's business. In the first quarter, Cash App made $80 million in Bitcoin gross profit, up 59% from last year. Block will continue to make a big bet on the cryptocurrency's future success, with plans to invest 10% of its gross profit from Bitcoin to purchase more Bitcoin.

A person uses a cryptocurrency app on their cell phone.

Image source: Getty Images.

3. Federal investigators are looking into alleged compliance violations

Over the past few years, companies have faced challenges from an evolving regulatory approach to anti-money-laundering laws. Fintechs, specifically, have felt the pressure to prevent fraud while they experience staggering growth as more payments go digital.

Last week, NBC News reported that federal prosecutors were investigating alleged compliance lapses at Square and Cash App. A former employee told prosecutors that Block failed to assess risks adequately and processed thousands of transactions involving countries subject to economic sanction and cryptocurrency transactions involving terrorist groups.

The news continues the story that first broke in February when NBC News reported that the whistleblowers filed complaints with the Financial Crimes Enforcement Network (FinCEN), a unit of the U.S. Treasury that analyzes financial transactions to combat money laundering or other illicit activities.

According to analysts at Macquarie, Block could face fines along with more robust oversight teams and infrastructure, which could add additional costs for the company. However, the company doesn't see structural limitations on the types of business Block can do. Analysts at Jefferies and BTIG also said the stock sell-off following the news felt a bit "overdone" and maintained a "buy" rating on the company.

Is it a buy?

Block has made solid progress on its efficiency goals, evidenced by its solid gross profit growth and record quarterly GAAP net income in the first quarter.

It also has a positioning advantage over competitors. According to The Motley Fool's Generational Investing Tools survey, Cash App is the most-used investing app, with 38% of respondents across all generations saying they use it.

The company will have to deal with the federal investigation into its anti-money-laundering practices, which could be an overhang for the stock until it is resolved. Bearing this risk in mind, I like the company's progress, which, combined with its brand positioning among younger generations, makes it a solid stock to buy and hold for the long haul.