Loaning Example 1

In my early gaming days (2001–2007) I played an MMORPG called Tibia. In Tibia, power was everything because any player could attack and kill any other player nearly anywhere within the game world, and if you were killed there was a chance you could drop all of your items and equipment. Due to this and the generally slow-paced nature of the game, making money was extremely hard for new players. Many players had tons of time to play, but their weapons and items were so weak that it took forever to amass any real amount of wealth. Due to the game’s age (released in 1997), some players had slogged through the grind and managed to be somewhat wealthy in game — even to the point where they couldn’t individually spend the money they had to further their goals.

Sadly I was a player in the first category, and like almost everyone else, I simply played the game for hours on end with bad equipment and struggled to get better, but one day while in-game I saw an incredible idea from a user in the trade channel:

“Pay me to hunt for you! Send money/supplies to me and I’ll hunt until they’re gone and send you back 75% of the profit!”

This service from the player was wildly successful as he was able to use his time/skill along with other players wealth to level up his character, more quickly create wealth for himself using better equipment/supplies, and pay investors profits off of his hunts. All the players using his service were better off than they would be individually, and this contract worked, but…

This requires an incredible amount of trust from the lenders

What if the player had simply taken the funds sent to him and run off? What if he lied about his profits and didn’t pay his investors the full amount? Sure, you could say that the borrower had to provide collateral (an item) that the lender was allowed to hold until he was re-paid, but now we’ve created the same trust issue from the other side. This agreement is potentially rife with scams, so how do we as game developers or players enact a system like this?

Using Enjin

Now we remove player-trust by creating a programmatically-completed contract that ensures all terms of the agreement are fulfilled. Let’s outline 2 players below and then see how this would work:

Detailing 2 players who may be interested in a lender/borrow contract

Player A has more expendable time that they can use to be productive (hunt) in the game, but can’t maximize the use of their time due to their inferior items. Player B has more wealth and items, but they don’t have enough time or the ability (you can only wear one set at once) to use all of the capital at their disposal. This would be a great example where a contract can bridge the time, skill, and resource needs of these two players. Let’s look at the pseudocode of how this contract would be written.

Pseudocode of a potential Enjin Loan Contract

For those less familiar with code, here’s a brief description of the contract:

This contract is a one month contract (contractDays=31), and the swap will occur when both players consent to the contract. Player A and Player B set the terms of the contract within the first if statement which states: the payback rate will be .45, Player B will send 15,000 gold, a Decay Rod, and a Wizard Set to player A. Assuming both players agree, the contract is initiated and the item swap occurs After the 31 days have passed (checked daily by the second if statement until true), 45% of the gold earned by Player A in the period of the contract will be transferred to Player B and the items on loan from Player B will be returned.

We’ve now managed to make a trustless system that allows players to pool resources and fully utilize their time, skill, and assets. This is a very simple contract example, but hopefully now you understand how this is an incredibly powerful tool.