In the dual model, the surplus of a company is a Lévy process with sample paths that are skip-free downwards. In this paper, the aggregate gains process is the sum of a shifted compound Poisson process and an independent Wiener process. By means of Laplace transforms, it is shown how the expectation of the discounted dividends until ruin can be calculated, if a barrier strategy is applied, and how the optimal dividend barrier can be determined. Conditions for optimality are discussed and several numerical illustrations are given. Furthermore, a family of models is analysed where the individual gain amount distribution is rescaled and compensated by a change of the Poisson parameter.