What happened

Shares of Devon Energy (DVN 0.98%) surged 25.1% in the first half of 2022, according to data provided by S&P Global Market Intelligence. That was an impressive performance, especially considering that the S&P 500 tumbled 20.6% during that period.

The oil company benefited from higher oil prices, giving it the fuel to return a boatload of cash to investors. 

So what

Oil prices spiked during the first half of this year. WTI, the primary U.S. oil-price benchmark, soared more than 40%, topping $100 a barrel for the first time in years. Supply constraints, stemming from underinvestment during the pandemic and made worse by Russia's invasion of Ukraine, came when demand was strong due to the ending of most pandemic-related travel restrictions.

Those surging oil prices were a boon for Devon Energy. The oil company generated a record $1.3 billion of free cash flow during the period. That gave it an enormous amount of money to return to shareholders, given its current capital-allocation framework.

Devon pays a base quarterly dividend, which increased 45% this year, along with a variable dividend of up to 50% of its free cash flow. The company's combined payment totaled $1.27 per share in the first quarter, up 27% from the fourth quarter, implying a 9.5% annualized dividend yield at the current share price.

The company is using the other half of its free cash flow to further strengthen its balance sheet and repurchase stock. Devon expanded its share-repurchase authorization by 25% to $2 billion after buying back $891 million of stock during the first quarter. Meanwhile, it ended the period with a $2.6 billion cash balance, $354 million above its year-end total.

Devon put some of that cash to work in June, agreeing to buy the assets of RimRock Oil and Gas for $865 million. The deal is immediately accretive to all its key financial metrics, including free cash flow per share. Because of that, Devon expects to increase its base dividend by 13% when it closes the deal, which could also enable it to pay a higher variable dividend, depending on oil prices in the future.

Now what

Surging oil prices are enabling Devon Energy to generate a gusher of free cash flow this year. The oil company is returning the bulk of that windfall to shareholders through dividends and share repurchases. Meanwhile, it added more fuel by making a highly accretive acquisition. These factors make Devon Energy an enticing option for investors looking to cash in on the current boom in oil prices.