This is got a long history, so a long reply to you.
No, you are wrong. Yes, all OTM expire worthless, because they are out of the money.
But any option with intrinsic value on expiry - which is markets above the strike for calls and below the strike for puts - then it is not 0.
So if you have shorted 11000 PE and markets close at 10977.55, then the intrinsic value is 22.45. So you as an option writer have to technically pay back this 22.45 to the buyer. That is how options work.
There is one issue with this, the settlement post expiry is considered as an exercise. Even though only cash settlement happens between the seller and buyer, it is considered as a delivery trade. Which means that STT on such a trade for the buyer of the option is 0.125% of contract (exponentially higher than 0.017% of premium if traded on the exchange).
What used to happen was, if a buyer of an option let 11000 PE expire and the market closes at 10995, he would get back Rs 5 as premium. But he’d have to pay Rs 13 as STT. We had a case where a client lost 25lks in STT on expiry for holding Rs 11000 worth of option premium. Check this thread:
Also, suggest you to read this blogpost to understand how it used to be before:
We pushed for a change with the exchanges for years. Finally, last August they introduced the concept of close to money options (CTM) and gave brokers an option to expire such position worthless. Check this thread:
So what it meant was that if a broker saw that his clients who had long options on expiry and if the STT value is more than the premium value, he could just let it expire worthless. This was to ensure that another Chirag Gupta kind of an incident wouldn’t happen. But note that it is all for option buyers. Option sellers aren’t affected by STT as it is paid when getting into the short trade. Option sellers also don’t have an option, they are obligated by definition to an exercise.
Coming back to your case, Nifty expired with the intrinsic value of 22.45. No option buyer would have opted to expire this worthless. The reason for this is, even after paying STT, he gets back 10 points. Assuming Nifty expired at 10990, an intrinsic value of 10 points (but they would have to pay back 13 points as STT) - in this case, all option buyers of this 11000 PE would have opted to expire this worthless. In which case, it would have been like expiring at 0.
Again, there might be some buyers who might by mistake opt to expire options worthless by mistake even when STT< Intrinsic value or options buyers who might exercise even if STT> intrinsic value. In all such cases, exchanges randomly assign options sellers to the buyers. So you might or might not be the one assigned.
Phew… Hopefully, you get it now. Also, make sure to read the blogpost.