Nigeria is discovering that oil riches can mean a windfall of wealth but also a hail of woes.

The country's vast oil reserves have held out great possibilities for growth on a continent where nation after nation has seen its development efforts falter and fail. Nigerian oil revenues this year are expected to exceed $23 billion, more than double the $9.4 billion the country earned in 1978. Nigeria's oil wealth provides 90 percent of its export earnings and 83 percent of government revenue.

But with the boom have come headaches.

A long-running "oilgate" scandal involving $5 billion in oil revenues allegedly siphoned out of Nigeria by oil companies, has sparked harsh public criticism of the government-owned Nigerian National Petroleum Corp., Western oil companies, and the military government that held power for 13 years until last October.

In mid-January, a Texaco offshore oil rig blew out and spilled thousands of tons of crude along beaches and into the fresh water estuaries of the Niger River Delta, hurting subsistence farmers and fishermen who lived in the scattered villages along the country's eastern coastline.

Government officials are also concerned that efforts to tighten controls on the oil companies may discourage participation of others and slow the country's plans to capture its natural gas and tap new oil reservoirs.

The "oilgate" controversy is being seen in some quarters here, however, as the event that will give President Shehu Shagari legitimacy to regulate the activities of foreign oil firms.

In April, Shagari suspended top officials of the Nigerian Petroleum Corp. and appointed a panel to investigate charges that Western oil companies had taken a great deal more crude out of Nigeria than they had paid for and that bribes were involved.

The panel gave its findings to Shagari at the end of June, but the report companies may be fined heavily and at least two companies may be expelled from Nigeria if the allegations prove to be true.

Government planners are now expecting that the aftermath of the scandal will bring long-needed energy planning, reorganization of the state petroleum company, and tighter control of production.

Government and oil sources said the plans being discussed now include incentives to new outside oil companies for exploration and development of gas reserves, and a larger voice for Nigeria in the production and marketing practices of the 10 existing companies that pump the country's oil.

Nigeria's proven oil reserves are estimated at 18 billion barrels, enough for the next 20 years at present production rates. But that estimate could be considerably lower than what actually exists, according to oil sources. Recent estimates could put the production reserves to up to 35 years, a high-level U.S. diplomatic source said.

Because of the nature of oil deposits in the Niger Delta -- small, scattered pools rather than large reservoirs -- oil experts believe there may be a lot more of the precious liquid there than they have been able to discover to date.

"Estimates of oil reserves in Nigeria are still a shaky proposition," one informed source said. "There is still a large, unexplored area out there."

The Nigerians are also conducting oil exploration in the northwest Sokoto region of the country and in the northeast around the Lake Chad basin.

"They want to get more companies in for exploration because they feel the more companies that are established here the better control they have," a Western observer said.

New companies have been reluctant to come in, he said, because last summer Nigeria changed the terms on oil exploration that had previously granted a company 40 percent of all the oil it found. Now, all oil discovered belongs to Nigeria and if the company finds none "they're just out of luck" and must absorb the costs of exploration, he added.

Only one new company, Crown Central Petroleum Corp. from Baltimore, took out an exploration contract last year, the source said. This year, the Nigerian National Petroleum Corp. may offer more lucrative terms, such as guaranteed access to a large percentage of whatever oil is discovered, to attract additional companies, he added.

There are now 10 oil companies operating rigs in Nigeria with Shell having the largest share of production -- a little less than 60 percent.Gulf has 15 percent, Mobil and Phillips together have 16 percent, the French company ELF 5 percent, Texaco 3 percent and Ashland, Pan Ocean and Tenneco together about 1 percent.

Nigeria also has huge reserves of natural gas and is presently burning off 600 million cubic feet of the gas each day in conjunction with its oil production. Only 6 percent of the gas is captured for domestic use.

The country's natural gas company, Bonny LNG, has plans to build a $10 billion natural gas refinery and export system. In February, Bonny signed letters of intent with eight European countries to supply 8 billion cubic feet of liquefied natural gas annually for 20 years beginning in 1985.

The Nigerians, in an effort to diversify their markets, have also been in long and, so far, unsuccessful negotiations with four American companies to supply an equal amount to the United States. The firms are Columbia Gas, Southern Natural Gas, Trunkline LNG and American Natural Resources.

"The stumbling block there," said an informed source, "is the price Nigeria is asking is much higher than the U.S. government has ever approved for imported liquid natural gas."

The same source said Nigeria is seeking high prices because the country will have to borrow at commercial interest rates the $10 billion to finance construction of the refinery and wants guaranteed markets at contractual prices before committing itself.

Concern for maintaining high prices on crude oil last week moved the government to cut back its oil production by 10 percent. Long a proponent of higher oil prices within the Organization of Petroleum Exporting Countries, Nigeria decided to cut back in the face of a world oil glut rather than bring down its prices.

Nigeria had been pumping 2.2 million barrels a day, 1.06 million of which went to the United States. The cutback reduced its production by 200,000 barrels a day.

A sharp drop in global oil demand created a glut on the spot market, where prices for African crudes fell to $4 a barrel below the official Nigerian price of $37. CAPTION: Picture, Nigerian oil revenue, from rigs like this, may exceed $23 billion this year. AP