The magmas responsible for porphyry formation are conventionally thought to be generated by the partial melting of the upper part of post-subduction, stalled slabs that are altered by seawater. Shallow subduction of young, buoyant slabs can result in the production of adakitic lavas via partial melting. Alternatively, metasomatised mantle wedges can produce highly oxidized conditions that results in sulfide minerals releasing ore minerals (copper, gold, molybdenum), which are then able to be transported to upper crustal levels. Mantle melting can also be induced by transitions from convergent to transform margins, as well as the steepening and trenchward retreat of the subducted slab. However, the latest belief is that dehydration that occurs at the blueschist-eclogite transition affects most subducted slabs, rather than partial melting.