Inspiration

I am passionate gamer who often end up with duplicate or unused Steam keys. Trading them should be simple and secure—without relying on third-party platforms or middlemen. Inspired by the principles of digital ownership and decentralized trust, I set out to create a way for players to swap game codes directly and safely using encryption and smart contracts.

What it does

Steam Code Swap enables two users to trade game keys in a trustless and decentralized way. Each game key is encrypted using the recipient’s public key, ensuring only they can decrypt it. The encrypted keys are then stored on-chain (or referenced there), creating a transparent and tamper-proof swap record. This allows trades to be conducted without either party needing to trust the other—or any intermediary.

How we built it

We generate ephemeral asymmetric key pairs client-side in the browser for each trade session. When two users agree to swap, each encrypts their Steam key using the other's public key. These encrypted payloads are stored in a smart contract. The entire flow happens without requiring the user’s MetaMask account to be involved in key generation or decryption—preserving both privacy and simplicity.

Challenges we ran into

The biggest technical and philosophical challenge I have encountered was dispute resolution. Since Steam codes are off-chain assets, their validity cannot be verified programmatically. A user can submit a fake or used key, and there's no cryptographic or decentralized way to prove it's invalid without involving a trusted third party or sacrificing the code by attempting redemption. I have explored options like:

  • Hash commitments to catch tampered keys
  • Stake-based dispute incentives
  • Optional arbitration (human or DAO-based)

But ultimately, I did not solve the core problem of verifying key legitimacy in a fully trustless way. This remains a major open problem in decentralized trading of digital goods.

Accomplishments that we're proud of

Built an encrypted code exchange protocol that doesn't rely on centralized infrastructure Implemented asymmetric key generation and encryption directly in the browser Designed a protocol that respects user privacy while ensuring on-chain transparency Developed a working prototype for secure, peer-to-peer game code swaps

What we learned

Learned that building trustless systems for real-world digital goods is hard—especially when those goods aren't verifiable on-chain. While cryptographic tools like public-key encryption and hash commitments go a long way, they can't solve everything. Validity of external data is still a major limitation in decentralized applications. I also deepened the understanding of how user experience, security, and decentralization often pull in different directions.

What's next for Steam Code Swap

  • Explore optional dispute resolution ideas
  • Integrate with identity systems to build reputation around trading behavior
  • Add support for other key-based platforms and/or include a system to verify the codes using some third-party solution.
  • Improve UI/UX for seamless trade flow and encryption handling

Built With

Share this project:

Updates