SoftBank Group Corp is set to post a gain of $34.1 billion by reducing its stake in Alibaba Group Holding from 23.7% to 14.6%.

But the Japanese conglomerate will not sell its shares directly in the market. It is using a complex security called "prepaid forward contracts," which is a derivative largely used by investors.

Here's how these contracts work:

WHAT ARE PREPAID FORWARD CONTRACTS?

A prepaid forward contract is a type of derivative contract that allows an investor to hedge risks associated with an equity investment in a company.

HOW DOES IT WORKS?

The contract involves a floor and a cap price, limiting investors' exposure to that price range.

To settle the contracts, investors can either pay financial institutions in cash or hand the physical shares.

"If the stock goes down in value below the floor, the investor is protected from that depreciation. On the other hand, if the stock appreciates above the cap, the investor doesn't participate in that upside," said David Martinez, an associate at law firm Clifford Chance.

ARE THERE OTHER ADVANTAGES TO PREPAID FORWARD CONTRACTS?

Prepaid forward contracts are widely used by investors who want to monetize positions without actually selling the stocks, said Gareth Old, a partner at Clifford Chance. To advance the money, financial institutions use the floor price of the range and apply a discount rate.

Prepaid forward contracts also offer some fiscal advantages, as investors only have to pay taxes on capital gains when the contract is settled.

WHY HAS SOFTBANK DECIDED TO PREPAY THE CONTRACTS BY DELIVERING ALIBABA'S SHARES?

SoftBank decided to hand 242 million shares in Alibaba to financial institutions because equity market conditions are challenging for a direct sale of the shares.

SoftBank also said the physical settlement would eliminate concerns about future cash outflows, reduce costs related to those contracts, and shore up its defenses against the market downturn.

The Japanese conglomerate stands to gain $34 billion from unrealized gains and also from the physical settlement.

"Obviously, they want cash," said Bo Pei, senior equity research analyst at U.S. Tiger Securities. "The whole technology sector is down like 30%-40%. SoftBank has historically been heavily invested in these areas, and now they need cash."