Federations of Infrastructure Service Providers (Inf-SPs) have emerged as an effective practice to cater for demanding applications in cloud-and edge-computing environments, by overcoming the limitations of each such provider (in terms of available resources, geographic coverage etc.). In this paper, we develop innovative mechanisms and policies for the decentralized management of InfSP federations, considering the needs both for resource allocation meeting service composition requirements, and for performing a fair and efficient distribution of profits. Resource allocation is performed by means of a greedy algorithm that includes an opportunistic and an adjustment phase. To determine the payments of participating InfSPs, we introduce an innovative sealed-bid reverse auction that combines VCG and first-price auction mechanisms. This hybrid mechanism, coupled with a sophisticated federation wallet management mechanism, serves as a revenue sink for the federation. Notably, our approach exhibits several nice properties, including efficiency, long-term budget balance, truthfulness and individual rationality. Furthermore, we present how our solution can be implemented in a decentralized, privacy-preserving and trustworthy manner over a blockchain, achieving bid privacy, non-repudiation and public verifiability. Our approach is evaluated by means of extensive experiments, the results of which reveal that resource allocation is either optimal or very close thereto, while individual InfSP profits as well as total federation profits are maximized. The results underscore the inadequacy of relying solely on the VCG mechanism for budget balance, justifying the necessity of our sophisticated hybrid solution.