Inspiration

Agents handle a wide variety of tasks for humans today. When we integrate agents in online businesses, or ask them to audit personal finances, or perform deep research on stocks and give investment advice we trust them with the task of making money!

For capital markets, however, the trust isn't quite there yet. Few people send agents off to compete with hedge funds and trading firms and expect them to win. For auction-style markets trading items like collectibles and artwork, however, there is more opportunity for agents to develop winning strategies.

When thinking of marketplaces where agents could come in, I remembered getting a Whatnot ad of a live-streamed sport cards auction with bidding built into the app, and seeing this video of a Douyin streamer advertising items for just 3 seconds each before moving on. With strict limits and fast payment actions (which can be done via blockchain), an agent could join these kinds of live-streams and snipe deals for a trader or buy rare or interesting items that an avid collector has been looking for. This was my inspiration for Commenda.

Commenda gets its name from a 13th century Italian maritime contract, where an investor gives a "traveling partner" capital to start an enterprise (at the time this was typically overseas trading ventures). This form of partnership was a precursor to modern venture capital/limited partnership agreements, and to the idea of funding an agent to develop a winning trading strategy, and go win: the core idea of this project.

What it does

Commenda runs flash auctions on a fixed schedule. Users can create agents and define guardrails (such as total budget, per-item bid limits, and item purchase limits) and pick desired item categories and bidding strategies. If an agent recognizes that a desired item is in the current auction, they join and bid against other agents. An AuctionEscrow smart contract handles all of the bidding logic and refunds, keeping only a flat fee per bid and ensuring agents either win the auction or get their bid back.

The winner of each auction gets a receipt token minted to their wallet. In a production setting, real collectibles would be tied to these receipt tokens that prove the auction's winner.

How it was built

  • Tech Stack:
    • Blockchain - Arc (testnet), USDC, Circle x402 facilitator, x402, foundry, wagmi, viem
    • ElevenLabs - Text-to-Speech + Voice Library
    • Webapp Stack - Next.js, React, TypeScript, Tailwind, Motion, shadcn, Magic UI and React Bits (through shadcn MCP)
    • Database: node:sqlite.

AI for Development: Opencode using models hy4-flash-free and glm-5.3-flash (around 80% of tokens used), and Claude Code using model Opus 5.5 (around 20% of tokens used).

Challenges I ran into

  • Verifying correctness, security, and reliability of the smart contract. If my product depends on an auction smart contract to manage bids and deliver refunds, it should work every single time, in every single scenario. I tested for common scenarios (making sure agent can't outbid itself, making sure two users can't bid the same amount, etc) and created a smart contract auditing skill to continuously refine it, but in a production setting, this wouldn't be good enough.
  • Implementing more advanced auction strategies. I think having an economics background or learning game theory would help me come up with different "presets" of strategies. However, the next big step would be letting users create strategies themselves and incorporate decision models like Jev, or even LLMs.
  • User experience design. Even though the core function is for the agents to work, it was hard to balance the UI to allow the user full control of their agent, while also creating that magic feel of watching the agent run things.
  • Knowing when to stop. Some parts of the project at its current state are a lot more thought out than others. I spent a lot of time debugging and improving the smart contract, and most of my frontend time was spent on the landing page, and other parts suffered as a result. I think starting earlier in the week / more efficient AI-driven development (better skills, tests, and hooks) would have made the app more polished than it currently is.

Accomplishments that I'm proud of

  • Execution of the core idea. The vision of the project I had while brainstorming is fulfilled - agents bidding against each other to win items, built on Arc.
  • Continuous design improvements over time. This required a lot of research into design principles, AI design skills, and UI libraries.
  • Improving AI agent behavior. This is the best result I've achieved from mostly AI-driven development. I felt I was on the same page with my AI agents for most of the project, and when they started veering off track, I was able to steer them in the right direction with new info or correcting false assumptions.
  • Working escrow contract, backed up by extensive testing. While brainstorming, I was a bit skeptical that the escrow contract would work this well, and this fast. The auction shown in demo is so fast that my ElevenLabs announcer was trailing by 0.5-1s!

What I learned

  • My knowledge + vocab gaps in web design. I had to browse through hundreds of UI examples on sites like 21st.dev to learn, "OK, this type of animation is called X".
  • Coding agent failure modes (the hard way). I learned that vague instructions, hedging language, and creating a "design" doc caused many false assumptions and stubborn behavior from agents.
  • Turning market mechanics into a smart contract (this was hard). I knew general auction terms (bid, outbid, escrow, etc.) but translating the exact process of an auction into correct code was challenging. I learned a lot about features offered by Arc and blockchain-development libraries to make this easier.

What's next for Commenda

  • Richer controls for agents. I want to incorporate decision models like Jev that the agents can call to make bidding decisions. This is a major upgrade from deterministic settings.
  • Live deployment, with real auctions. Physical item fulfillment would be challenging, but NFTs would integrate with the current idea nicely. Deploying to real users would also stress-test the smart contract.
  • more plans in the README.

Built With

Share this project:

Updates

Submission history