v3.
November 13th, 2022

It’s already been a few months since we’ve deployed the Happy-Hour-Protocol-Engine-v2 (v2) to the Ropsten testnet this summer along with its interactive application. So much has happened since then, not only in the crypto markets but also within the happyhourLabs team. If you haven’t noticed or not, we’ve been relatively quiet and mute on the socials due to a myriad of reasons.

So why are we upgrading the smart contract? Well for many reasons listed below that we’ll get into, but the main reason is that we wanted to give it a more robust architect before going to mainnet. And considering that the previously deployed testnet app was leveraging the now deprecated testnet, Ropsten network, it’s only natural that we re-deploy to another testnet.

But nevertheless, we’re back in full force and ready to serve up a banger of a whisky cocktail.


Let’s first start with what’s happened so far?

-Word of Mouth

We cannot be more grateful for the few individuals and supporters of this project for the past few months. Just seeing others on the internet whisper their piqued curiosity is more than enough to get the team at happyhourLabs excited all over again. Sure we might not have gone viral yet but the organic enthusiasm that started this industry is all that’s needed for us to push this forward. We’re not doing this for money or fame, but rather to see two colassol industries (web3 x F&B) move together for a single goal.

Word of mouth is going to continue driving this project forward. Whether it be from the average plebs like us or from the owners of established F&B spots, the communication between the two is our only bridge that makes sense for this all to work.

There is no premine, no VC fundraising, no affinity marketing hype bloated with bots, but rather pure altruism.

-PDE Onboarding

A few local F&B spots have expressed interest in becoming a PDE on the testnet application. Well, why not, right? The benefit is mutual for both parties.

If you have a F&B spot in mind that you think would benefit from this protocol, chat with them about the protocol.

-Digital Media Assets

We’re looking to ramp up our marketing efforts in the next coming months. Our current portfolio of digital media assets, i.e., logos, banners, graphics, ads, etc., are a bit light in KBs. Most of these already existing assets can be found on our website.

If you are interested in contributing to the project and banging out some awesome designs utilizing the existing assets, by all means feel free too.

-Constructive Community Feedback

More $HOUR for those who spend more? Allowing the rich to get richer?

Over the past few months, we’ve received many great feedback from our community on what they saw wrong and what they saw right about the tokenomics of the happyhourDAO. One of the biggest flaws is one’s ability to endlessly earn $HOUR, which we will address below.

Another suggestion we got back was the minting design of $HOUR. The question that was posed verbatim was: Why not allow drinkers who spend more at a PDE during their session to earn more $HOUR? Essentially basing the $HOUR earned in proportion to the drinks/food you order. On initial thought, this was reasonable and logical in fairness to those who can contribute more financially to a PDE. It’s like with any economy. Those who contribute more to society should be rewarded more. We could even compare this with Bitcoin’s PoW consensus algorithm, which allocates a higher chance of being rewarded with bitcoin if more hashrates is supplied by a miner.

We get it. It makes sense.

But.

Are we allowing the rich to get richer? Are we underestimating the value that a drinker can bring to a PDE besides having to “ball out” at the counter? Would we be looking at this model in a singular frame of view that your financial contributions is that only thing a PDE is looking for?

Let’s think of an example. Would a PDE want a solo drinker to just come in, order drink after drink by themselves, and end up obliterated by the end of the night looking like a pathetic drunkard? Or would a PDE value one that does not relatively order too many drinks, but is able to pull in many other Drinkers and is conducive to the social vibes and environment of the PDE?

Earning $HOUR should not be considered a degenerate flex-off competition. The uniformed minting rate of 100 $HOUR per hour is for equality and uniformity across the board. And anyways, this wouldn’t have any bearing or disincentivize a Drinker that was already planning on “ballin’ out” for the night.

Just be YOU at happy hour.

-Out With The Old

If you haven’t noticed already, we’re using Mirror instead of Medium for publishing our blogs. Because f*ck web2.


So what’s new with v3?

-Penalized $HOUR

Unfortunately, there was a loophole in the previous v2 contract that basically allowed any Drinker to continuously earn $HOUR over an infinite period of time. Sure, there is a loyalty/enforcement system in place assuming PDE’s force a Drinker to end their current session before they leave that particular PDE location, but a Drinker could always just sneak out the back and never end their session. Leaving them with hundreds, potentially thousands, of freshly minted $HOUR tokens.

A new if/else implementation was added that essentially “penalizes” a Drinker if they leave their opened sessions for over 8 hours. If a session is left over 8 hours, a Drinker will only receive 1 hour’s worth of $HOUR tokens as a penalty. Because let’s be real, we’re not trying to encourage raging for over 8 hours and doing something that you’ll regret later in life. And eventually a PDE will have to close shop for the night.

    function endHOUR(address payable wiped) public {

        address PDEcommission;
        require(msg.sender == wiped);
        timeOUT = block.timestamp;
        hoursSpentDrinking = (timeOUT - timeIN) / 60 / 60;

        for (uint i = 0; i < pdes.length; i++) {
            if (pdes[i]._PDEid == drinkingIDtoPDEid[drinkingID[msg.sender]]) {
                PDEcommission = pdes[i]._address;
            }
        }

        if (hoursSpentDrinking < 8) {
            nullPoolDrinkingId();
            happyHourFeePool -= 1;
            wiped.transfer(happyHourFee * (10 ** 16));
            uint HOURearned = hoursSpentDrinking * (HOURperhour * (10 ** 18));
            uint PDEcommissionEarned = HOURearned / PDEcommissionRate;
            _mint(wiped, HOURearned);
            _mint(PDEcommission, PDEcommissionEarned);
            emit endHOURresults(hoursSpentDrinking, HOURearned, PDEcommissionEarned);
        } else {
            nullPoolDrinkingId();
            happyHourFeePool -= 1;
            wiped.transfer(happyHourFee * (10 ** 16));
            uint PDEcommissionEarned = (HOURperhour * (10 ** 18)) / PDEcommissionRate;
            uint penalHOURearned = HOURperhour * (10 ** 18);
            _mint(wiped, penalHOURearned);
            _mint(PDEcommission, PDEcommissionEarned);
            emit endHOURresults(hoursSpentDrinking, penalHOURearned, PDEcommissionEarned);
        }

So there you have it. No more endless streams of unearned $HOUR tokens flowing your way. Sure we’d all love more $HOUR tokens but eventually the party’s gotta’ end. As the cliche phrase goes: Drink Responsibly.

-Leaner Smart Contract

Cut out some unnecessary fat in the smart contract. For example, previously there was some functionality for whitelisting opportunities but the dev team figured, “we fair launching this mtherfckers!”

-Separated Solidity Source Files

The previous HOURv2.sol source file comingled all the contracts together. In v3, we’ve separated it into two different files: HOURv3.sol and DRNKv3.sol. Not much of a major change but just keeping align with best practices.

Deployed and verified HappyHourProtocolv3 contract on the Goerli testnet:

Deployed and verified DRNKgovernance contract on the Goerli testnet:

-Improved Front End App

React will be the weapon of choice for the Goerli testnet app and the mainnet app. The previous app utilized ExpressJS and its corresponding ejs syntax, which were all perfectly fine, but for certain design resigns, React will once again be used for this DAO project.

We are still undecided if we will use the same revamped front end for both the Goerli testnet and when it launches on mainnet.


That’s wraps up the updates with what’s going on with v3. Again, contracts have been deployed and verified on the Goerli testnet for read and write functionality.

So go ahead and stop by your local PDE and startHOUR() at your next happy hour!


Drink with us and join the conversation

Twitter: https://twitter.com/happyhourDAO

Discord: https://discord.gg/XegjVTGmyR

Github: https://github.com/happyhourDAO/Happy-Hour-Protocol-Engine

Gitbook: https://happy-hour-1.gitbook.io/happyhourdao/

Subscribe to happyhourDAO (🍸,🍸)
Receive the latest updates directly to your inbox.
Nft graphic
Mint this entry as an NFT to add it to your collection.
Verification
This entry has been permanently stored onchain and signed by its creator.
More from happyhourDAO (🍸,🍸)

Skeleton

Skeleton

Skeleton