Firstly, you are asking if you pay stamp duty on the sale of an option – I think there is no stamp duty on a sale, just on the purchase – so you would pay stamp duty when you buy the option and the new buyer will pay stamp duty on his/her purchase from you.
Secondly, I think stamp duty is only payable on the option amount, unless the value of the option is more than you are paying.
Here is a link to an online version of the ruling
http://www.osr.nsw.gov.au/lib/doc/rulings/rrsd130.pdf (easier for copying and pasting).
First look at the 3rd point in the preamble:
Under the Second Schedule of the Act, conveyance duty is assessed on
an option agreement on the greater of the consideration expressed in
the agreement or the value of the option.
What this means (my interpretation) is that duty is charged on the consideration or the value of the option, whatever is higher.
Now look at the 2nd point under the heading ruling for the definition of ‘value’:
“The value of an option will be the amount by which the value of the
property over which the option is granted exceeds the expressed
exercise price.”
In your case, the consideration for the option is $20,000.
The value of the option is value of property less $180,000.
So if you are getting the property for $180,000, but the value is $210,000, the value of the option is $30,000 and stamp duty will be levied on this amount.