Inspiration
Freelancers can finish a milestone. Freelancers may still be owed payment. Similarly clients may pay upfront for a service. Clients have few ways to track whether the right work is delivered.
We have created ProofPay, a shared escrow record for milestones that both parties can agree on.
What it does
The client starts a milestone by locking up test ETH in Base Sepolias contract. The freelancer then submits freelancers file, link or handoff text with a SHA-256 fingerprint.
Once the work is reviewed the client approves payment. The contract releases the deposit. If no work was submitted before the deadline the client may request a refund.
Any agreement will have a public proof link that anyone may check against and view an agreements status without having a wallet. By comparing a submitted proofs fingerprint to the stored one in the agreement any third party verifies that the file (or text content) submitted has the bytes or text as stored. The verification does not show whether the work was satisfactory.
How we built it
We have written the contract in Solidity and deployed it on Base Sepolia. The front end uses React, Vite and viem for reading agreements and connecting to browser wallets, such as OKX. The browser computes the SHA-256 fingerprint and the contract stores the hash, proof reference, participants, deposit, deadline and payment status.
We have tested the contract payouts, access control and refund feature with Ganache.
Challenges we ran into
Switching between wallets made it easy to perform an action with a wallet that was not intended. Likewise a custom contract call may appear as an 'Unknown transaction' in the wallet. We added account and network checks and a view for transaction details with a destination address and ETH value before asking the wallet to make the call.
We also had to be careful in defining 'proof' as a hash of a file or text can only verify that the same content was submitted. The hash does not prove authoring or that the delivered work meets the clients expectations.
Accomplishments that we're proud of
ProofPay has a working end-to-end milestone flow, which resulted in a funded, submitted and completed payout on Base Sepolia (see transaction https://sepolia.basescan.org/tx/0xb3b07f927d695836eb0f1fe19f97e60dafee9c4557c30c70139295ae824b8851 at sepolia.basescan.org). ProofPay team was also able to create agreement and proof pages that anyone may view, without a wallet.
The live application (https://ppay.kennyy.tech/) and source code (https://github.com/M3264/ProofPay) are available publicly. also pitch deck here https://github.com/M3264/ProofPay/blob/main/docs/ProofPay-pitch-deck.pdf
What we learned
Smart contracts are great for implementing roles and rules about who moves money and when. The user interface must make every wallet interaction clear to users before users sign and send a transaction. We have also learned to describe the limitations of proofs, such as what a SHA-256 hash can and cannot verify.
Whats next for ProofPay
Next, we’ll explore a mutually agreed arbiter or a time-limited dispute process, then audit the contract before using real funds.
Built With
- base-sepolia
- ethereum
- ethers.js
- ganache
- javascript
- nginx
- node.js
- okx-wallet
- react
- sha-256
- solidity
- viem
- vite
- web-crypto-api
Log in or sign up for Devpost to join the conversation.