Peer-to-Peer (P2P) content delivery, known for scalability and resilience, offers a decentralized alternative to traditional centralized Content Delivery Networks (CDNs). A significant challenge in P2P content delivery remains: the fair compensation of relayers for their bandwidth contributions. Existing solutions employ blockchains for payment settlements, however, they are not practical due to high on-chain costs and over-simplified network assumptions. In this paper, we introduce FairRelay, a fair and cost-efficient protocol that ensures all participants get fair payoff in complex content delivery network settings. We introduce a novel primitive, Enforceable Accumulative Hashed TimeLock Contract (Enforceable A-HTLC), designed to guarantee payment atomicity - ensuring all participants receive their payments upon successful content delivery. The fairness of FairRelay is proved using the Universal Composability (UC) framework. Our evaluation demonstrates that, in optimistic scenarios, FairRelay employs zero on-chain costs. In pessimistic scenarios, the on-chain dispute costs for relayers and customers are constant, irrespective of the network complexity. Specifically, empirical results indicate that the on-chain dispute costs for relayers and customers are 24,902 gas (equivalent to 0.01 USD on Optimism L2) and 290,797 gas (0.07 USD), respectively. In a 10-hop relay path, FairRelay introduces less than 1.5% additional overhead compared to pure data transmission, showcasing the efficiency of FairRelay.
翻译:点对点(P2P)内容交付以其可扩展性和鲁棒性著称,为传统的集中式内容交付网络(CDN)提供了一种去中心化替代方案。P2P内容交付面临的一个重大挑战是:中继节点对其带宽贡献的公平补偿问题。现有解决方案采用区块链进行支付结算,但由于高昂的链上成本和过于简化的网络假设,这些方案并不实用。本文提出FairRelay——一种公平且经济高效的协议,确保在复杂内容交付网络环境中所有参与者获得公平收益。我们引入了一种新型原语——可强制执行累积哈希时间锁合约(Enforceable A-HTLC),旨在保证支付原子性,即确保所有参与者在成功完成内容交付后收到其应得报酬。FairRelay的公平性通过通用可组合性(UC)框架得到证明。我们的评估显示,在乐观场景下,FairRelay的链上成本为零。在悲观场景下,无论网络复杂度如何,中继节点和客户的链上争议成本均为常数。具体而言,实验结果表明,中继节点和客户的链上争议成本分别为24,902 gas(在Optimism L2上相当于0.01美元)和290,797 gas(0.07美元)。在10跳中继路径中,与纯数据传输相比,FairRelay仅引入不到1.5%的额外开销,展现了其高效性。