Inspiration

I have been always wanted to try making Web3 based freelancer platform since I seem to never ever win a bid on freelancing gigs in traditional freelancing platforms. And at the same time I also wanted to try playing around with Solidity language for a while. Seeing this hackaton, I decided to make my first smart-contract powered website.

What it does

It is a simplified version of traditional freelancing marketplace (for now) but with smart contract. Client can post a work (labeled as "bounty") and freelancer can post a bid on those bounties. Both client and freelancers will sign up with Web3 wallets like Metamask.

When a client created a bounty, this platform will ask the client to set spending allowance and store the reward fund to smart contract, which later be paid the moment client picked a winning bid for their bounties. In the smart contract, platform will take 5% cut for each payouts made (platform fee is configurable when deploying smart contract).

How I built it

This project uses Svelte 5, Bun (JavaScript), and Tailwind. Blockchain-wise, it uses Solidity to deploy smart contract. LLMs used to help debug, design, material research, and so on, but most of the code is handcrafted from scratch. All images used in this project is AI-Generated with Gemini or Qwen.

As the business logic over the smart contract it goes like this:

  1. I deployed two smart contract - one that has the actual business logic where clients create bounty and so on, while the other one is a smart contract factory, cloning the first smart contract every time a bounty is issued.
  2. To save gas fee, when a freelancer make a bid to a bounty, the website doesn't make a call to the smart contract. Instead the web3 wallet will sign the bid as a finger print that later be verified when the client actually award the bid as a winning bid. This I believe is sufficient to guard against fraud bids since actual Web3 wallet and the submission timestamp required to sign the bid.
  3. I'm using OpenZeppelin library in Solidity to help holding token, verify bids in the smart contract, and so on.
  4. At the moment smart contract accepts ERC20 tokens as fund, not the main Eth token. This is sufficient for prototype since it supports both MNEE in production environment and Sepolia WETH for testing purpose with zero to little effort to switch between the two.

Challenges I ran into

I joined the hackaton midway and had 3 weeks to make everything from scratch, while also have to learn Solidity from almost zero (had briefly looking for documentation and youtube tutorial in the past but never build a project myself with it). I rely on LLMs to search for Solidity design and most of the time pasting errors and screenshots relating to Solidity to LLM since I'm not quite familiar with Solidity dev setup.

I got quite a headache when trying to implement Hardhat into my repo and found out later on that Hardhat 3 beta somehow not using latest version of Zod library, which breaks the dependency. I decided to give up implementing Solidity setup in my repo and instead do them elsewhere.

Testing MNEE token on smart contract also proven to be difficult. I can't afford to pay gas fee of almost $20 every time I test creating a smart contract on Ethereum mainnet (though I managed to Screenshot the smart contract pop up with Metamask wallet). Meanwhile, MNEE (as far as I know) doesn't exist on Sepolia testnet which make testing inconvenient. Fortunately, the business logic in the smart contract doesn't need to specify MNEE token to work, but any ERC20 Tokens will do, so I managed to get WETH on Sepolia network in development to test the smart contract while easily convert to MNEE in production. The website will pick which Ethereum network (mainnet or Sepolia) based on the environment the webapp run.

Accomplishments that I'm proud of

I think 3 weeks of works creating a working freelancing marketplace alone is quite an achievement for me. I probably never go this far building something with Solidity and so far this is the farthest I had creating a Web3 project which I rarely dabble myself with.

What we learned

3 weeks ago I was pretty much had almost zero idea on how Solidity works except for the vague idea that it can do some calculation and paying people in the blockchain. In this hackaton, I ran into problems and find out solutions like doing smart contract factory, signing signature with Web3 wallets, some details regarding Solidity like using keccak256 function to turn string into bytes32 to efficiently store stuff in the smart contract. In this phase I also find out that Solidity has its own libraries like OpenZepplin to import, which previously I thought people code everything in Solidity from scratch.

I had learn a lot in this hackaton regarding smart contract. Had my own fun doing it and also can't avoid the frustration due to my unfamiliarity with Solidity make it very hard to debug. I'm certainly will have easier time working with Solidity next time but for now I can't say I'm very proficient with it.

What's next for Web3 Bounty

There's a lot of features missing in this project that I can't manage to fill in these past 3 weeks. Also, the website itself has quite a lot of empty space so I need to write tons of stuff to make it look like proper freelancing marketplace.

The auth system will need to be reworked. Maybe try looking for Web3 based auth library but if I could make it work smoothly UX and security-wise I probably will stuck with the current auth design for more control.

The error handling will needed to be more robust too. It quite suck when something wrong happened in the blockchain while the app backend don't know what to do with it.

Finally, maybe later on I'll try different smart contract than Ethereum once it is no longer the hackaton requirement. Gas fee on Ethereum is too pricey for this project to be viable in production.

Built With

Share this project:

Updates