How do pack openings work?
Last updated
Last updated
Opening packs or lootboxes in Ethgard Legends happens fully onchain and can be verified by any party. The code we're using has been developed by us and is state-of-the-art tech.
You can open packs by visiting the items inventory and clicking on open for a specific pack/lootbox.
Afterwards, you can select the quantity you'd like to open and after confirming the action, you're required to sign a request that you'd like to allow the game to open the packs via the smart contract for you. The signing will be valid for a week, but it can also always be revoked manually.
Next up, we're getting a random hash via drand. The hash and your signature (if required) will be send by the game to the smart contract, covering the gas fees in the process, triggering the wanted pack opening. Important to note here is that this step has to be done by a trusted party (i.e. the game), as a malicious player could use a contract to trigger the pack opening and just revert/cancel it if the pack/lootbox content is not optimal. The randomness hash, chain hash and block round, which are used to verify the hash, along with the pack opening contents and consumed items will be stored on the blockchain and shortly after fetched by the game and distributed back to the website, showing you, the player, the result. As mentioned in the beginning, this process is completely transparent and can be verified by any party, verifying that the opening contents are truly random.
The related pack opening to this FAQ entry can be found here: https://ethgardlegends.com/inventory/hero/open?t=0x774b55ff16ae73524f7df85f180a84a7ec795ba12fbfac040a2bd6cae7eac983
To verify the outcome yourself, you could either use a blockchain indexer which requires development knowledge, or use basescan. Basescan Logs: https://sepolia.basescan.org/tx/0x774b55ff16ae73524f7df85f180a84a7ec795ba12fbfac040a2bd6cae7eac983#eventlog
Putting it all together you'll get a link like this: https://api.drand.sh/52db9ba70e0cc0f6eaf7803dd07447a1f5477735fd3f661792ba94600c84e971/public/9099992 Opening it, will return you:
The chain id we are using it creating a new randomness every 3 seconds. Subtracting the latest round with the given round (9099992) times 3 (seconds) should allow you to verify that the round was within the timeperiod of the transaction. The game always takes the next one after the current one when the transaction was submitted by the player.