SafeLoot
SafeLoot is an ambitious MVP of a digital goods marketplace, currently in active development. The core product focus is trust: escrow-protected transactions and a dynamic rating model that adapts as users complete deals.
- Escrow-first deal lifecycle: created → funded → delivered → released/refunded
- Dynamic reputation system recalculates buyer and seller ratings after each completed or disputed deal
- MVP scope is intentionally focused on transaction safety and trust mechanics before public scale
- Current stage: private build with ongoing iteration on edge cases and automated tests
type EscrowStatus = "created" | "funded" | "delivered" | "released" | "refunded"
export async function releaseEscrow(dealId: string, buyerId: string) {
return prisma.$transaction(async (tx) => {
const deal = await tx.deal.findUniqueOrThrow({ where: { id: dealId } })
if (deal.status !== "delivered") throw new Error("Deal is not delivered yet")
if (deal.buyerId !== buyerId) throw new Error("Only buyer can release funds")
await tx.escrow.update({
where: { dealId },
data: { status: "released", releasedAt: new Date() },
})
return tx.wallet.update({
where: { userId: deal.sellerId },
data: { balance: { increment: deal.amount } },
})
})
}