A novel structural model is developed to understand the determinants of green bond prices and the so-called 'greenium', that is, the premium that bondholders are willing to pay to invest in green securities rather than conventional ones. The presence of a greenium makes green bonds relatively cheap vehicles to fund environmentally sustainable projects and thus contributes to the shift to a green economy. Yet, evidence on the greenium is mixed and the determinants of green bond yields are not fully understood. In this model two sources of uncertainty are introduced, that is, of cash flows of the firm and of the effectiveness of the financed green projects. The adoption of two risk factors brings in some mathematical complexity but allows for a better modelling of the multi-facet nature of these financial instruments. Our model is rich enough to generate both a positive and a negative premium, as both have been detected in the empirical literature. Thus, we shed light on possible heterogeneity concerning the existence of a greenium in the green bond universe. Moreover, we show how green bonds affect the issuer's creditworthiness, depending on the correlation of the green project with the core business of the firm and study their impact on investors' portfolio allocation.