project screenshot 1
project screenshot 2
project screenshot 3

Sambla Recurring

Trustless recurring payments backed by smart contracts, that does not need both parties to trust each other - they trust the chain.

Sambla Recurring

Created At

ETHGlobal Bangkok

Project Description

Rent is an issue for new migrants moving to cities. In some jurisdictions, rent is paid upfront in 1-year sums, because both the tenant and landlord do not trust each other and the sum is a guarantee that the tenant will not break furniture / overstay on unpaid rent.

At the same time, new expats / migrants moving to new cities may not have opened a bank account, or have sufficient cashflow in-hand to make 1-year payment sums. In effect, this creates sufficient friction when finding a new property for the tenant - he would either have to take a loan from his company, or hop between places / hotels until he has opened a bank account + raised sufficient cashflow to rent a sustainable place of his choice.

We believe in giving autonomy back to both the tenant, and assurance of payments to the landlord. Our solution utilises smart contracts and stablecoins to ensure the smooth processing of multiple recurring payments - the smart contract locks a two-month instead of a one-year fiat collateral, ready to be withdrawn in the case of a default, by the landlord. On the side of the tenant, the tenant would have the ability to leverage the growing trend of cross-border stablecoin transfer businesses (or any ERC-20 coin for that matter) into the smart contract from offshore, thereby allowing the user to pay for his rent while forgoing the need to open a bank account in the region.

For the sake of satisfying KYC and AML regulations in the jurisdiction, we propose the smart contract will have the following features:

  • A cap on the total amount allowed to be stored and transferred, and withdrawn to the address
  • Leveraging a KYC / KYB onboarding business to prove both the tenant and landlord are valid entities allowed to transact in that jurisdiction and are tied to that wallet, ensuring end-to-end compliance is met.

This would not have been possible with fiat. The product is not complete, but we are seeking validation. Help us make this reality, today.

How it's Made

Here's an expanded and engaging response for "How it's made":


How It's Made

This project was built with a modern, modular approach, leveraging cutting-edge technologies and creative problem-solving to deliver a seamless solution. Here's a deep dive into the nitty-gritty:

Frontend

The frontend is crafted using SvelteKit, chosen for its lightning-fast performance and ability to handle both server-side rendering (SSR) and client-side hydration seamlessly. We paired it with Tailwind CSS for a utility-first approach to styling, ensuring consistency and rapid development.

To simplify form handling and validation, we integrated Superforms, allowing us to create dynamic, user-friendly forms with minimal overhead. For styling components, DaisyUI extended Tailwind with pre-designed, accessible elements, speeding up the design process without compromising on quality.

Backend

The backend is powered by NestJS, which provides a modular architecture, making it easy to scale and maintain as the project grows. Prisma acts as our ORM, bridging the gap between the application and the database, and enabling us to write queries intuitively and efficiently.

We used Devbox, similar to Pyenv, to create isolated development environments. This ensured consistency across team members’ setups and allowed us to manage dependencies without conflicts. With everything written in TypeScript, we achieved robust type safety, reducing bugs and enhancing code clarity.

Database

Our database is built using PostgreSQL, a reliable choice for handling complex queries and ensuring data integrity. Prisma’s schema-based migrations helped us maintain a structured and version-controlled database.

Smart Contracts (Upcoming)

For smart contract functionality, we plan to use Solidity to write secure, efficient Ethereum contracts. Hardhat will be our go-to framework for testing and deploying these contracts, offering a comprehensive development environment with powerful debugging tools.

How It’s Pieced Together

The frontend communicates with the backend via REST APIs, built in NestJS, ensuring efficient data flow between the client and server. Prisma simplifies database interactions, while Devbox ensures a smooth local development experience. Every layer of the stack has been thoughtfully integrated, emphasizing performance and maintainability.

Notable Hacks & Workarounds

  1. Dynamic Forms with Superforms: We created a reusable, dynamic form system that adapts to backend data structures in real-time. This cut down development time significantly.
  2. Optimized Development with Devbox: By setting up environment isolation, we avoided the typical "it works on my machine" issues. This was particularly useful for managing diverse dependencies.
  3. Custom Prisma Middleware: We built custom middleware in Prisma to handle complex, nested queries effortlessly, ensuring the backend operates smoothly even under heavy data loads.
  4. Component Library Tweaks: DaisyUI was extended with custom utility classes tailored to our project’s specific needs, ensuring both speed and uniqueness in the design.

Partner Technologies

By integrating DaisyUI and Superforms, we saved considerable development time while maintaining a high-quality user experience. Additionally, Prisma’s ecosystem tools, like Studio, allowed us to debug and explore the database seamlessly.


This combination of innovative tools, efficient integrations, and hacky problem-solving has enabled us to build a project we’re proud of—streamlined, scalable, and ready for future expansion.

background image mobile

Join the mailing list

Get the latest news and updates