Description
One of the core elements that makes Defi Kingdoms truly unique is the Hero Summoning mechanics. This mechanism mimicks the principle of genetic reproduction to determine a summoned hero’s Classes and Skills which results in a deceptively complex gameplay. To aid players in buying or hiring heroes to summon with, I’ve created a matchmaking webapp.
The webapp, DFKmatchmaker (dfkmatchmaker.herokuapp.com) has been live since late March and has been regularly used by players. In the current iteration it’s a simple tool where the player enters a Search Hero ID (or enters their wallet and selects a hero they own) to return a table of heroes in the Auction Houses to either buy or hire. The table includes attribute ‘scores’ (e.g. class or skill) where players can sort and select. For example, the highest Class ‘score’ is the hero that when summoned with the Search Hero will have the highest (out of all heroes listed in the Auction House) chance of summoning a hero with higher tier class (e.g. Wizard and Priest summoning a Summoner). Players then can click on that hero to view the likely resulting hero attributes and the respective likelihood (essentially the output of the /match discord bot).
As the game expands and the pool of heroes (and players) grows, there is an opportunity to expand by:
- providing more advanced tools to look for heroes to buy or hire, including but not limited to :
- Manual Stats, Gene and Level filtering
- User generated custom scoring based priority ranking (i.e. class mutation first, Passive 1 second, etc)
- Implementation of a table of candidate heroes and a matches table where users can generate and compare multiple match results
- enabling more proactive approach to finding heroes, where user can submit alert request on when a hero is listed for sale or matching a specific set of criteria
- applying statistical modelling and machine learning techniques to support summoning.
Grant Rationale
This Grant will enable expansion of DFKmatchmaker by covering the development and hosting costs.
While there are plans in the Milestone 3 (see Deliverables) to monetize via premium subscription, the grant will ensure that users can still access all services for free at a limited capacity.
Specifically, the grant will fund the following:
- upgraded Heroku Server tier, Databases tier and add-ons to support expansion
- subsidise the time spent and time that will be spent on expansion
- obtain a better domain name than the free heroku domain name
Grant Amount
The hope is to receive the 10K USD grant, as this will be sufficient to cover the cost listed above and sustain the webapp for free use for the foreseeable future (2+ years).
Team Information
Team Lead - David Wu
The webapp (frontend and backend) was developed by myself. My name is David Wu and I was a Systems Engineer by trade in Australia. After 10 years in the Defence industry I am currently a full time dad and transitioning into software development (studying a Masters in Machine Learning) as this has always been my passion.
Requests from DFK Team
Currently, the webapp interacts with Harmony API and DFK community API gateway for hero and auction data. For future expansions to other blockchains and/or new features, API access will be requested
Connection to DFK Game and DFK Blockchain
The current system makes the following API calls:
- Wallet data from Harmony blockchain (pull list of heroes the wallet owns for selection)
- Hero and Auction house data using GraphQL API
Deliverables
Deliverables
Milestone 1 (completed) -
Current App - Features:
- Hero Match (User enters a hero ID or Wallet Address to find optimal hero for summoning)
- Manual Match (User enters two IDs to calculate genetic likelihood)
In this milestone, the core matching and search backend has been also developed where a custom database is maintained for all Auction House heroes. This was developed to enable scaling to cover all heroes (~200K vs Auction House’s ~12K sale and rent combined). The proof of concept scoring system employs space-time tradeoff to enable scoring matches through look-up tables rather than calculations (i.e. calculate match probabilities, score and rank of every hero in the auction houses). This is done through a SQL table with a row for each hero in the Auction House (updated every 10 minutes) and a very large number of columns (1 for each possible genetic trait) and the search algorithm looks up the input hero specific columns, sum them to calculate the score.
With this core engine, the much more complex stats scoring and the larger search pool of all heroes can be implemented in Milestone 2.
For those interested, I published a guide/article documenting the scoring system and space-time tradeoff algorithm for this project:
Milestone 2
Additional Matchmaking Functions - Features:
- Optimal chance of purple, blue, green stats matching hero class (i.e. optimal chance if a warrior is summoned, it’ll also have Str and End as its stat boost), QoL improvements and mobile support.
- Advanced Class and Ability scoring algorithm which will result in a more accurate ranked return.
- Advanced Results filter, Auction House visualisation, price distribution.
- Free Match mode. Enable creation of a table of target heroes and users can freely match against Auction House heroes. Match results can be added to a third match table with all the results for comparison selected possible matches.
Estimated Completion by the 31 Jul 22.
Milestone 3
Matchmaking Services - Features:
Auction Listing Alert - Search all heroes (not just what’s listed in Auction Houses) and allow users to sign up for alerts on when that hero is listed.
Match Alert - Submit heroes to be on a search list and scoring threshold and alert user when a hero is listed that matches the threshold
At this milestone, monetization could be implemented but rather than a direct subscription model, the plan is to make all functionalities free with limits and offer a premium service. As an example, in Free mode each unique wallet is allowed to submit up to 5 heroes each for Auction Listing Alert and Match Alert. Premium model may allow much higher capped submissions for each alert subscription.
Estimated Completion by 30 September 22 (on assumption that no new developer is added to the team).
Milestone 4
Advanced Functions - Features:
Auction Price Guide - Using Machine Learning techniques to predict the value of specific genes (dominant and recessive) so a user can value heroes. This will be possible provided sufficient number of transactions has been conducted since the latest major change (e.g. introduction of PvP will change value of genes and value of impacted genes will need to be adjusted). In theory this will provide a much more accurate estimation.
Multi-generational matching (stretch goal) - User provides multiple heroes (4, 8, 16) to optimise 2nd, 3rd, 4th generational likelihood. Like the simple matchmaking, users can provide 1 or more heroes and the Auction House will be searched to identify the optimal set of heroes for a full set of summoning. For example, an user could provide 2 heroes and the tool to calculate a list of potential pairs of heroes to match with that will summon the optimal set of 2 heroes that will in turn summon the optimum 2nd generation (i.e. best chance to summon Sages or Dragoon or heroes with Transcendent skills). Further statistical modelling is required to confirm the viability of this stretch goal as potentially the computation cost might be too much to be used (it’ll take too long to search and rank).
Stats Optimization Score (stretch goal) - A complex scoring algorithm that maximises chances of summoning an optimal hero with Class matching Profession as well Stat traits that also matches both the Class and Profession (e.g. a Paladin with Str and End Stat trait that also is a Miner). Viability of this goal is also to be confirmed as this might also be too computationally costly.
Estimated Completion by the 31 December 22
Payment Schedule
Milestone 1 - $2,500
Milestone 2 - $2,500
Milestone 3 - $2,500
Milestone 4 - $2,500
Timeline with Milestones
Milestone 1 - Upon Grant Approval
Milestone 2 - 31 Jul 22
Milestone 3 - 30 Sep 22
Milestone 4 - 31 Dec 22
Long Term Plan
Upon completion of the Milestone 4, it is envisaged that I will maintain the service with periodic feature improvements/additions and implement the service in new blockchains brought online by DFK.
Post Milestone 4, it is envisaged that proceeds from the premium subscription service would be sufficient to sustain the free service (ongoing server cost and maintenance of the implemented functionalities). The intent has always been to make as much of the service free as possible and to this extent, all functionalities would be free to use with restrictions only placed on the volume of usage (i.e. restricts the number of heroes a player/wallet can subscribe for alerts rather than limiting that function to a premium tier).
While the plan is to implement the scope as defined in this grant by myself, I am also open to collaboration with other interested developers to explore other functions/tools to help Defi Kingdoms players.
Other ideas (not part of the grant submission) include:
- Indirect buy-offer mechanism where:
- User identify a good match hero that not for sale and if its owner is registered to receive offer, then
- A Price offer is communicated (automated email or scripted DM)) to the owner
- If the owner is interested, they can log on to see the offer (app can gather similar recently sold prices for guidance) and if the owner agree to sell, they are instructed to list on Auction House the hero at the offered price
- App will monitor Auction House for this listing and alert the User who made the offer of the listing
- This will avoid the need to interact directly with the blockchain (in keeping with the app’s original principle of being a tool only and not becoming part of the main game itself)
- A tinder/bumble like front end mobile app for users to swipe to match with their heroes
External Links
Product: https://dfkmatchmaker.herokuapp.com/
Twitter handle: https://twitter.com/DfkMatchmaker/
File Uploads