Stages of composting: trends for pH and electrical conductivity
The mixtures underwent a first mesophilic phase (18–45°C), a thermophilic phase (45–70°C), and a second mesophilic stage, followed by the maturation phase, which took place in the open air for thirty days (Fig. 1a). The first mesophilic phase was longer for mixture 4 compared to the other mixtures. The temperature of mixture 1 dropped after the second addition of CS but increased again three days after, reaching 59.7°C five days after.
The temperature increases are normally attributed to the metabolization of easily soluble compounds (e.g., sugars, starch, and simple proteins) and the insulation provided by the composting mass against heat loss . The thermophilic phase lasted 25 days for mixture 1, 24 days for mixture 2, 6 days for mixture 3, and 13 days for mixture 4; the respective peak temperature recorded were of 59.7, 63.4, 56.9, and 58.5°C, respectively. An exposure time of at least two weeks at 55°C is considered the optimum condition to effectively eliminate human and plant pathogens, along with weed seeds and insect larvae . The shorter thermophilic phase of mixture 3 may be attributed to the heap compaction registered during the composting process . For mixture 2, the rapid increase in temperature and the overall temperature profile could attributed to the BC presence. Biochar may fill free spaces between particles of raw materials and reduce heat losses during composting . Moreover, BC addition provides suitable conditions for the proliferation and activity of microorganisms through increased aeration, water and nutrient retention, and toxin adsorption . Temperature drops registered after around 30 days indicated the slowdown of microbiological processes, and that all the mixtures reached stability, even before the maturation phase that lasted other 30 days.
Moisture content of the four mixtures was maintained between 40 and 60% during the whole process to assure the optimal conditions for the microbial communities (Fig. 1b). The moisture content for mixture 4 was purposely adjusted to a lower value to avoid the compaction and the emission of ammonia, due to the high content of CS. On the contrary, the coarser texture of mixture 1 led to larger water evaporation during the first ten days.
At the beginning of composting, mixtures 1, 2, and 3 had a slightly alkaline pH (pH 7 to 8), while mixture 4 showed an acidic pH (Fig. 2a) due to the higher content of CS, which had a pH of 5.5 (Fig. 2a). During composting, the pH of all the mixtures increased to 8 and 9 during the first week, and then became constant after 30 days except for mixture 1, where a slight decrease in pH was observed during the maturation process. At the end of composting, the pH of mixture 1 was slightly lower than those of mixtures 2 and 3 (8.5) and especially that of mixture 4 (9) (Fig. 2a). The increase in pH throughout the composting process may be attributed to the release of ammonia associated with protein degradation, while the subsequent decrease during the maturation stage may be caused by the volatilization of ammoniacal nitrogen and proton release resulting from the microbial nitrification process . The pH of the mixtures is relevant for controlling N-losses by ammonia volatilisation, which may be particularly high if pH raises above 7.5. Furthermore, pH values of 6.7–9.0 support good microbial activity during composting and pH levels lower than 9 indicated that the four mixtures were safe for plant health and agricultural use .
The electrical conductivity of the mixture increased with composting time, especially that of mixtures 1, 3, and 4, which had values above 2 mS cm-1 at the end of composting (Fig. 2b). As organic matter degrades, the concentration of cations increases with a surge of EC, so the salinity of the material . The lower EC of mixture 2 (below 2 mS cm-1) might be attributed to the presence of reactive surfaces within the high pore space of biochar, which may enhance adsorption of cations. This adsorption mechanism is normally described as a results of the interactions of cations with the functional groups in biochar skeleton  or with the π electrons of the condensed aromatic rings, or the formation of colloids .
High salinity may cause osmotic stress, which may negatively affect microbial populations involved in the composting process and limit plant growth and productivity. Recommended limits of electric conductivity are around 2 mS cm-1, although Solanaceae (tomatoes, aubergines, etc.) tolerate values up to 2.5 mS cm-1 , and other crops such as barley, cotton, and wheat can tolerate levels as high as 8 dS/m .
Overall, all the final composts reached satisfactory values of pH and EC. The presence of biochar seems to improve the thermophilic profile and reduce the electrical conductivity of the mixtures, but barely affect their pH.
Carbon and nitrogen dynamics during composting
The carbon content of mixtures 1, 3, and 4 slightly decreased throughout the composting process, a common trait of organic matter degradation (Fig. 3a). However, mixture 2 had an opposite trend due to the addition of BC. At the end of composting, the organic C contents of mixtures 1, 3, and 4 were significantly lower than that of mixture 2 (Fig. 3a). The increase of C content of mixture 2 can be attributed to the high stability of biochar C, which is likely to be left barely intact during the process, and the relative higher loss of other elements with composting. Indeed, its structure gives biochar higher stability against microbial degradation carbon, meaning that carbon pools from biochar have longer persistence times and a higher carbon sequestration potential than labile carbon sources from silverskin and pruning waste . In addition, the presence of functional groups on the biochar surface leads to the chemisorption of the dissolved organic carbon  rendering them stable and contributing to the increasing trend for C content observed for mixture 2. These results highlight the positive effects of BC a co-composting agent to reduce the amount of organic fraction degraded and GHG emissions .
The nitrogen content of the mixtures without biochar tended to increase during the composting, while that of the mixture with BC remained constant (Fig. 3b). Final compost from mixture 2 had a significantly lower content of N than the other composts, whereas N content increased with the proportion of added CS for the other mixtures, being mixture 4 significantly richer in N than mixture 1 (Fig. 5b). All the composts presented more than 1.5% N content, and thus can be classified as high-quality composts following the classification by Diaz et al. 2007 .
The C/N ratios measured for the mixtures ranged from 18 to 30 (Fig. 3c). Commonly, C/N ratio is assumed to decrease from the optimal value of 25 for the starting pile to 15 at the final stage . The use of low C/N ratio amendments poses a phytotoxicity risk favouring the conversion of NH4+ into NH3 and/or the release of organic acids due to the immaturity of compost. At the same time, when compost with a high C/N ratio is added to soil, the microbial population tends to compete with plants for soil N, leading to the so-called “nitrogen starvation” . The typical targets for the C/N ratio of composting mixtures could not be applied for blended biochar composts because of the high stability of most biochar C, meaning that some of the C pools are not really involved in the microbial metabolism of the compost; Khan et al.  suggested that in matured co-composted biochar the value of C/N can be higher than 21, as in the present study.
Namely, 85–90% of the total N content in composting mixtures is organic (e.g., proteins, simple peptides nucleic acids), and only 10–15% is inorganic N forms immediately available to the plants . During composting, the organic N fraction undergoes microbial mineralization, a two-stage process: the ammonification of complex organic nitrogen to inorganic ammonia leading to the accumulation of NH4+, followed by the nitrification or microbial oxidation of ammonia (NH3) via nitrite (NO2) to nitrate (NO3-) .
The low ammonium concentration in mixture 1 and 2 at the beginning of composting (Fig. 4a) can be explained by the low starting concentration of CS and by the greater efficiency of the system in transforming NH4+ to NO3 especially for the mixture 2, since it has been proved that the BC presence provides a favourable microenvironment for nitrifying bacteria . Mixture 3 exhibited the lowest initial concentration of ammonium, a marked peak raising to 13.6 g kg-1 at around day 30, and a final drop after 30 days to 0.09 g kg-1 (Fig. 4a). The ammonification peak usually reached in the first stages of composting corresponds with the maximum biodegradation period. The high NH4+ peak registered at day 30 can be related to the 10°C rise recorded as the outcome of the microbial activity growth (Fig. 1a). For mixture 4, ammonia-like odours were noticed during the aeration procedures carried out. This may be attributable to the physical and chemical characteristics of CS presented at high doses in this mixture. On the one hand, N contents of the mixtures increased with the proportion of added CS; on the other hand, CS has a great WHC and a compaction behaviour when humid, favouring the onset of anaerobic spots, provoking N-loss via ammonia, nitrogen oxides (NOx), and nitrous oxide (N2O) emissions .
Nitrate concentration for all the mixtures showed an upward trend throughout the first phases of the composting process (Fig. 4b), reaching more than 6 g kg-1 NO3- for mixtures 1 and 2, more than 9 g kg-1 for mixture 4, and more than 16 g kg-1 for mixture 3 in their final composts (Fig. 4b). The declining NH4+ and the proportional increment of NO3- were in line with the steady evolution of the curing stage; indeed, nitrification occurs predominantly at mesophilic temperatures (20–35°C) . This trend, together with the NH4+/NO3- ratio < 0.16 registered for all the mixtures is an index of high quality amendments and confirms that the compost reaches the maturation phase .
Several authors agreed that passive methods such as adsorption by adding BC to compost is an effective method of reducing nitrogen losses [24, 29]. Indeed, BC absorbs/adsorbs NH3, NO3− and NH4+, and a wide range of organic N compounds, reducing greenhouse gasses emission and improving fertiliser properties of compost . Thus, the use of BC constitutes a solution for excessive compaction, anaerobiosis and N losses for those composting mixtures aiming to high N contents, even using higher proportion of CS than those evaluated by the present work.
Agrochemical quality of the final composts
CS is a by-product of the food chain and its content in trace elements is strictly controlled. Therefore, the contents of micro-, macro- and trace elements of the final composts match the requirements of the Spanish national regulation on compost quality (Royal Decree 506/2013) to be classified as Class A amendments (Table 3).
All four composts showed optimal values of P and very high values of K, compared to the majority of compost from vegetal by-products, which gives even more agronomic value to the final composts. High contents of micronutrients such as Ca, Fe, and Mg have also been detected. The range of almost all nutrients increased with the proportion of CS in the initial mixture. However, a further increase of CS proportion above the level established for mixture 4 could exceed the legal limit established for Cu contents in compost. Cu is a crucial micronutrient for plants, but also a plant chlorosis trigger due to its interference with redox and free radical reactions . However, the Cu mobility could be limited by the basic pH  of the composts, diminishing any possible risk of contamination.
WHC of our four mixtures accounts for 351, 237, 305, and 335%, respectively (Table 3); such elevated values are due to the fact that CS has more WHC than other similar plant by-products like cereal husk and straws . Applying those amendments to soils will likely increase the storage of water at the soil surface, leading to consequent benefits for plant development and soil structure .
Germination test (Table 4) confirmed that the CS has a phytotoxic effect probably mediated by Chlorogenic acid  which discourages its use in agriculture as an amendment or mulching agent. However, the resulting compost by the four mixtures (Table 4) did not presented phytotoxicity and even exhibited phytostimulant properties, especially compost 2 and 4. The phytotoxicity reduction confirmed that on the one hand, the mixtures reached full maturity regarding the N cycle; on the other hand, that the decomposition of potentially phytotoxic organic substances of CS, mainly phenolic compounds and Chlorogenic acid has been fulfilled after composting. These results allow the safe application of the four composts to the soil (Gómez-Brandón et al., 2008).
Potential of recycling coffee silverskin in agriculture though composting
Our results confirm that composting is a low-cost, feasible, and effective method to recycle CS, generating high-value amendment rich in N and K from this by-product. Trace metals contents in CS are far below the levels of concern and CS phytotoxicity is reduced through composting.
CS is a food-grade by-product with low safety issues, easy to collect during the whole year since most of the roasting processes are comparable and insensitive to seasonal variability. Thus the mixing proportions for the composting piles require few if no adjustment once they have been established, easing the handling and the logistic of the whole process.
Europe was the most significant green coffee importer region with 3.9 million tons in 2020 (FAOSTAT, 2022) thus, accounting for the production of ~ 167 thousands of tons of CS during the roasting process. Wong et al.  calculated that N losses during composting ranged between 18 and 41% for raw materials comparable to CS and in similar composting conditions. Based on this and on the results of our study, composting the whole CS produced in Europe will lead to a recovery of 2,420 to 3,481 N tons, depending on the amount of N loss during the composting process. Similarly, considering that we have observed no-leaking from the composting mixtures, we can assume that composting the whole CS produced in Europe will lead to 1,874 K tons, not to mention other micro and macro-nutrients. The data assume a greater relevance considering that composting the CS accumulated per year could account for the 0.01–0.02% of total N fertilizer demand, and 0.05% of K2O fertilizer demand in Europe (FAOSTAT, 2022), reducing the reliance on mineral fertilizers thus contributing to the challenge of meeting the growing demand of food without compromising the environment.
Promoting eco-friendly management of agricultural by-products appears to be essential in the context of the emergency of global warming, helping to reduce greenhouse gas (GHG) emission, the reliance on mineral fertilizers, and achieving the EU landfill reduction target of 10% by 2030 .
CS-based soil composts must be considered as amendments increasing the WHC of the soils. The addition of these types of composts is useful to retain higher water quantities over a longer period of time on soil surface, increasing the permeability of water and favouring the formation of soil aggregates, thus improving the overall soil structure and porosity with a fundamental positive effect in regulating the water cycle and protecting soils from erosion and compaction .
As suggested by Ronga et al. (2016), coffee-derived composts represent a suitable alternative as a growing media ingredient in replacing peat aliquots to produce potted plants. Further studies are needed to assess the potential of BC to increase the proportion of coffee by-products added to a composting pile, since the combination of those materials seems to provide optimum water and air holding capacity, low bulk density, and high cation exchange capacity reducing to a minimum the risk of N losses .