Heroes Tavern - an onchain social platform for the collections of Myths

Objective: The primary aim of this proposal is to bolster user interaction and the utility of heroes within DeFi Kingdoms by developing an on-chain social platform that utilizes the Lens Protocol and the ERC6551 standard.

Insipiration: DeFi Kingdom is a fantastic game, but it is missing an core element that in my humble opinion, makes a game fun - and that’s the social aspect of it.

MMORPGs are like a mass delusion, a collective fantasy that we all live in. Being able to pretend to live in an other environment along with others is one of the most fun things you can do.

I propose we build a new social media platform - Heroes Tavern, that allows players to play out and share their achievements with others. enabling another level of interaction beyond the core gameplay.

Objective: To enhance user interaction and utility of heroes within DeFi Kingdoms by Creating an onchain social platform based on the Lens Protocol and the ERC6551 standard.

Plan of Action:

  1. Deployment of Lens Protocol Contracts on DeFi Kingdoms: The first phase still involves deploying Lens Protocol Contracts on DeFi Kingdoms, to enable the creation of a social layer for blockchain networks that can foster community engagement and social interactions among users.
  2. Integration of Diamond Standard Facets for Heroes: Given that heroes in DeFi Kingdoms are compliant with the Diamond Standard (ERC-2535), we will develop and integrate custom facets for these heroes to allow for unique account addresses capable of owning various types of tokens and in-game assets. These facets can use the “Diamond Storage” approach mentioned in the description of the ERC-2535 standard for efficient and safe data handling.
  3. Establishment of a Hero Register: As with the original proposal, this phase involves creating a registry to bind every hero to their Diamond Standard facet, enabling effective tracking of each hero’s assets and interactions within the platform.
  4. Airdrop of Lens Handles - .hero: Lens handles (denoted as “.hero”) will be airdropped into heroes’ diamond facets, representing unique on-chain identities for each hero.
  5. Development and Launch of Heroes Tavern: Finally, the Heroes Tavern, a communal virtual hub where heroes can interact, trade, and participate in events, will be developed and launched. This platform will initially be web-based, with plans for a future mobile application.

Additional Features and Enhancements:

  1. Customize the User Interface: To set Heroes Tavern apart and align with the aesthetic of DeFi Kingdoms, custom graphics, fonts, color schemes, and other game-specific thematics will be incorporated into the platform’s design.
  2. Integrate with the DeFi Kingdoms API: If available, the game’s API will be used to pull data into the platform, allowing for automated sharing of achievements and game progress.
  3. Gamify the Platform: To align with the gaming nature of DeFi Kingdoms, game-like aspects such as earning badges for reaching certain milestones or participating in events, as well as the introduction of leaderboards, will be incorporated into the platform.
  4. NFT Display and Trade: A dedicated section of the platform will be established to display the NFTs held by a hero, potentially facilitating trades between accounts.
  5. Community Engagement Features: To encourage user interaction, features like user forums, chat rooms, and the ability to ‘like’ or ‘upvote’ Myths will be incorporated.
  6. Mobile Compatibility: To cater to players accessing the platform via mobile devices, the platform will be designed with mobile compatibility in mind.


The integration of Lens Protocol and ERC6551 contracts will empower heroes with enhanced functionalities, fostering increased engagement within DeFi Kingdoms. The Heroes Tavern will provide a dynamic platform for users to share their gaming achievements and participate in a richer, more interactive gaming community.


Update: The ERC6551Registry.sol contract is now live on the Avalanche Testnet. You can view the deployed contract here: ERC6551 on Avalanche Testnet

This contract, part of the ERC6551 (Token Bound Accounts) standard, allows for each NFT to have its own account. Key functions include:

  • createAccount: Computes creation code, deploys a new account using Create2, and emits an AccountCreated event. If initialization data is provided, it initializes the account.
  • account: Computes and returns the address of an account with given parameters. It does not create the account if it doesn’t exist.

Go check out the verified contract code for more details. Keep in mind to also familiarize yourself with IERC6551Registry.sol interface and ERC6551BytecodeLib.sol library which are integral to this contract, alongside the OpenZeppelin’s Create2 library.

Update: A simple ERC721 contract has been deployed and is live on the Avalanche Testnet. Here’s the link: ERC721 on Avalanche Testnet

For those interested in testing this, please drop your address in the comments, and a testnet ERC721 token will be sent to your account.

Furthermore, to any developers out there, I would greatly appreciate if someone could send me a testnet hero so I can assess how ERC2535 interactions function.