The stock market’s new rules implemented in the wake of the flash crash did their job early this week when the cocoa exchange traded note (ETN) dropped sharply in mid-day trading.

Cocoa prices have gone up to 30-year highs as a result of a ban on exports by the Ivory Coast.

The internationally recognized winner of last year’s election, opposition leader Alassane Ouattara, called for the ban in order to starve incumbent President Laurent Gbagbo of tax revenues, reports NPR. [Agriculture ETFs: Major Shortfall Predicted.]

As a result, iPath Dow Jones AIG Cocoa ETN (NYSEArca: NIB) is rewarding investors who have stuck by it. NIB, which tracks a basket of cocoa futures, is now close to all-time highs.

But Tuesday morning, the cocoa futures market took an 8% dip, which lasted about two minutes. That sent the benchmark index of the ETN – DJ-UBS Cocoa – down, as well.

That’s when the market’s new rules kicked into gear. The NYSE enacted short-selling restrictions because of the activity that was taking place during the drop, and it busted any transactions that took place in that window.

Aside from that issue, the markets otherwise had a normal trading day.

Five-day trading volume shows that NIB is a small fund with less than $20 million in assets.

The fund tracks a narrow sector, as well, and considering the world economic issues and trading restrictions, it did very well. Tuesday’s activity is a great example of a “perfect storm” that was averted, since the proper check systems were in place. [Cocoa ETN Delivers Sweet Returns.]

Tisha Guerrero contributed to this article.