We suggest a simple and general approach to fitting the discount curve under no-arbitrage constraints based on a penalized shape-constrained B-spline. The approach accommodates B-splines of any order and fitting both under the L1 and the L2 loss functions. An application to US STRIPS data from 2001-2015 suggests that polynomial splines of order three and four are mandatory to obtain reasonable fits. The choice of the loss function appears to be less relevant.