In an IPO, the shares are allotted based on the demand for the issue. For instance, if the IPO is undersubscribed, all the investors who applied for the issue receive full allotment. Meanwhile, if the issue is oversubscribed, IPO allotment is done via a computerised lottery system.