Klee Rewards is back and better than ever!

We are pleased to announce the launch of the new Klee rewards system, rebuilt from scratch and better than ever!

If you haven’t noticed already, things have been pretty busy for the Klee team lately. Being a community backed project, we wanted to give you another snapshot into what we’ve been working on and the process behind the madness.

Earlier this year, after the expansion of our team, we sat down and discussed a 12 month roadmap for the future of Klee, what would be prioritised and look at how we would achieve these goals. We took stock of all the aspects of the project and as discussed in our last article, identified the need to remove the projects reliance on third parties.

We created Gantt charts to schedule for upgrades to be rolled out and steadily replace legacy systems as well as plan for the development of the launchpad. The team had a clear vision for the future and excitement buzzed among the team with what was to come. That buzz lasted about 2 weeks until the Klee rewards system began to have issues pushing weekly KleeRun gameplay payouts.

We were suddenly pushed into a situation where all timelines had to be pushed back and maximum priority was given to restoring the rewards mechanism. Players were understanding of the problem at hand. We had a Play-2-Earn service that didn’t allow some users to withdraw their earnings. We feel it is important to provide an explanation as to how this happened and what we’ve done since.

In the last article we looked at the challenges that crypto projects face in their infancy and the need to rely on third parties.

The rewards system was built by one of these third parties & built with very little information being provided, there were certain claiming charges that simply didn't add up. The arrangement was an open partnership meaning we didn’t have to provide capital (which at the time we didn’t have) and was the best option for the project at the time. The developer had previous experiences in building the rewards/pay-out utility which was being used by a number of other crypto projects so everything appeared to be reputable so it was just a matter of white labelling the utility to suit the Klee project.

For over 6 months this system worked without issue until earlier this year, when we launched the Klee V2 contract, we noticed some issues occurring around case sensitivity for how wallet addresses were being referenced. Users started reporting incorrect balances or that their rewards were not being allocated appropriately. The system effectively became unusable.

We notified the developer of the issues we had observed who initially tried to rectify the bug to no avail. The biggest issue here was that the system was completely controlled by the developer and we had no access to the server to introduce fixes ourselves. The developer then decided to become complacent and stopped responding altogether. We were also not the only project utilising their services and noticed that he was not reachable for any projects.

Rebuilding the rewards system in house had already been a task we had planned to undertake later in the year so we could provide seamless integration with the Launchpad development however as a developer you always try to structure a roll out with a proactive approach not reactive. In this case, we didn’t have a choice and had to reprioritise our inhouse development team to rebuild the rewards system as soon as possible.

We started to discover immediately how the rewards system needed to behave and scoped the requirements. One area where we sought to seek improvement was the fees associated with the pay-out operation. As many Klee users would be aware, withdrawing funds under the previous system could be quite expensive. it was not uncommon for a user to pay a $20 — $40 fee to withdraw their funds. The previous developer had told us this was just the price of GAS however it seemed unreasonably expensive.

As you might have guessed, we are big fans of Ethereum however it is a reality for projects built on ETH that there is more GAS involved (for now anyway). When a user withdraws their funds, we ask the user to cover the GAS fee involved in the pay-out transaction. In turn the transaction to cover the GAS fee also requires GAS. All of this being said, what the previous system charged a user still seemed excessive and something we looked to rectify.

After further investigation, we discovered the excessive GAS fees came down to 2 issues with the previous system. The first was the way the developer was calculating the GAS price which was largely over estimated. The second was related to the pay-out contract the developer had launched.

Smart contracts with pay-out mechanisms are commonly the target of malicious attacks and vulnerability exploits. They also tend to require periodic updates or expansion in functionality so it makes sense not to operate a pay-out mechanism off a tokens main contract. After auditing the pay-out contract built by the previous developer, we decided the best course of action moving forward was replace it with a new, optimised contract. By doing this, we were able to control every aspect of the rewards mechanism without relying on any third-party developers.

We launched the new contract and began testing. After correctly calculating GAS fees and running some transactions, we noticed that in most cases, the fees passed on to the user were over 10 times less than what was previously charged, a massive improvement over the previous workflow.

The new contract and workflow has also been developed in a way that if a user has additional funds allocated within the pay-out contract, these funds are automatically allocated, reducing the amount of GAS payable on the next redemption.

Needless to say we also addressed any issues that may result from incorrectly parsing the case sensitivity of wallet addresses.

When it came to building the dApp, we wanted to make sure both the design and backend framework would be able to operate within the future release of the Klee Launchpad and luckily our design team had already built the Launchpads style guide so it was not difficult to carry this through to the rewards mechanism. The backend has been built to be modular so while for now it will operate as a stand alone system, it will seamlessly become part of the Launchpad in the future.

A question we have received from many users in the community relates to previous balances. We would like to clarify that while the pay-out system has not been working, the API’s that log a users scores and redemption balances have remained fully operational throughout this period and all balances have been brought across to the new system. Please remember that a users balance is linked to a specific wallet address so you must connect to the dApp using the wallet linked to gameplay to redeem.

We would like to thank the community for their patience in waiting for the new system to launch. We have worked tirelessly to not only have it up and running again but provide some significant improvements to the security and usability of the system.

Claim your earnings today by visiting our new rewards claiming module here - https://klee.games/claim




Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store