Lancer

A protocol for building dApps with on-chain payments, escrows, and dispute resolution.

Lancer

Created At

ETHOnline 2025

Project Description

My project 'Lancer' is a combination of three main components: 'Lancer Protocol', 'Lancer Factory', and 'Lancer Market', this last one being a deployed marketplace instance built with Lancer Factory to showcase the complete system in action.

With 'Lancer Market', I'm representing a decentralized marketplace for freelancing, where users can register as a 'Buyer' (the company or employer) or as a 'Beneficiary' (the freelancer or service provider). When both parties agree on a 'Deal' (representing a specific task, job, or service to be delivered by the Beneficiary), the Buyer deposits the agreed PYUSD amount into an on-chain escrow managed by the marketplace smart contracts. This ensures that funds remain locked and transparent until the work is completed and verified.

Once the 'Beneficiary' delivers the work, the 'Buyer' can approve the release of funds, but in case of not being satisfied, they can request a dispute resolution through 'Lancer Protocol', where registered and reputation-weighted judges review the dispute and vote on the outcome. Judges are incentivized by a system based on Game Theory: those who vote with the majority earn a reward in PYUSD and gain reputation, while those who vote with the minority do not receive the economic reward and lose reputation. This process increases fairness and transparency without relying on centralized intermediaries.

Additionally, every marketplace integrates Aave v3 for yield generation on escrowed funds, allowing the 'Owner' to earn passive income and offer lower fees to their users. It also integrates Blockscout’s Autoscout for one-click transparency of on-chain actions and Envio's HyperIndex for improved UX and faster UI loading times.

The 'Lancer Factory' allows anyone to deploy their own marketplace instance like 'Lancer Market', with customizable parameters such as fees and governance rules. This enables the creation of independent marketplaces that share the trustless backbone provided by 'Lancer Protocol' and access the pool of registered judges.

There are several features I plan to implement that are still pending, so I included an extensive TODO section in the README file.

How it's Made

I used Scaffold ETH 2 with the Envio extension included, which saved me a lot of time.
Since I have around 3 years of experience as a smart contract and backend developer but no experience using AI, I tried to use it as little as possible (only ChatGPT and Copilot free versions).
But for the frontend modifications, I did them almost entirely with AI, and it was a bittersweet experience, but necessary, since I don’t have frontend experience and my initial partner, who’s really good at that, wasn’t able to participate. The one hacky thing I did was manually simulate some parts of Aave and Lancer Protocol during testing, using mock contracts and direct storage slot writes with vm.store() to emulate dispute states, it was maybe not the best solution but it worked perfectly for testing.

background image mobile

Join the mailing list

Get the latest news and updates

Lancer | ETHGlobal