From 9d563b011fd36b19624ac7d70faa0a0717e059c3 Mon Sep 17 00:00:00 2001 From: Mark Spanbroek Date: Thu, 27 Feb 2025 09:57:33 +0100 Subject: [PATCH] marketplace: remove accounting that is now done by vault --- contracts/Marketplace.sol | 27 --------------------------- 1 file changed, 27 deletions(-) diff --git a/contracts/Marketplace.sol b/contracts/Marketplace.sol index 0c90bdf..925ec71 100644 --- a/contracts/Marketplace.sol +++ b/contracts/Marketplace.sol @@ -473,33 +473,6 @@ contract Marketplace is SlotReservations, Proofs, StateRetrieval, Endian { return _requestContexts[requestId].expiresAt; } - /** - * @notice Calculates the amount that should be paid out to a host that successfully finished the request - * @param requestId RequestId of the request used to calculate the payout - * amount. - * @param start timestamp indicating when a host filled a slot and - * started providing proofs. - */ - function _slotPayout( - RequestId requestId, - Timestamp start - ) private view returns (uint256) { - return _slotPayout(requestId, start, _requestContexts[requestId].endsAt); - } - - /// @notice Calculates the amount that should be paid out to a host based on the specified time frame. - function _slotPayout( - RequestId requestId, - Timestamp start, - Timestamp end - ) private view returns (uint256) { - Request storage request = _requests[requestId]; - if (end <= start) { - revert Marketplace_StartNotBeforeExpiry(); - } - return request.ask.pricePerSlotPerSecond().accumulate(start.until(end)); - } - function getHost(SlotId slotId) public view returns (address) { return _slots[slotId].host; }