Перейти до основного змісту

💰 Introduction

INFILTRATION is a blockchain-based Player vs Player (PvP) survival game, combining the world of NFTs with strategic gameplay on the Ethereum blockchain. The contract employs Chainlink's Verifiable Random Function (VRF) to generate a provably fair random number to determine each round’s outcome. This ensures that the process is fair, transparent, and tamper-proof.

For more details, see the Chainlink VRF Documentation.

In INFILTRATION, players mint and manage NFTs known as Agents. The game begins with a minting phase, where a limited number of 10,000 Agents are available for players to acquire at a fixed price of 0.05 ETH.

Once the minting phase concludes, the game transitions into its main action phase. Here, the dynamics of the game come to life. Every round (35 Ethereum blocks / 7 minutes), a percentage (0.3%) of all active agents are randomly marked as wounded. Players will have 48 rounds to attempt to heal their wounded agents using the LOOKS token, although the healing process itself does not always guarantee the player’s agent will heal. There is a likelihood that a healing request fails, and this % will increase with each round that the agent remains wounded (starting at 1% and maxing out at 20%). If a healing request fails, the agent dies. Each round can accommodate at most 30 total healing requests across all wounded agents. Additionally, 25% of all LOOKS tokens used to heal agents will be immediately burned.

Players are also able to escape with their agents at any time, leaving with a small portion of the existing ETH rewards pool. The amount that agents can escape with will start off low, but will increase as the game goes on.

As the game progresses, the field narrows, with each player’s agents either dying from wounds or permanently escaping. This continues until only 50 active agents remain. In this final Endgame phase, an agent dies every round until a winner is declared. During this phase, players will be rewarded with a mix of bonus ETH and LOOKS based on the position that they died or left the game. The longer an agent remains, the more rewards they will be able to claim. Players can continue to escape their agents during this final phase. The last surviving agent will win a much larger additional ETH pot.

Game Phases

The game is divided into three main phases outlined below:

Phase I - Minting

This minting phase ends lasts 24 hours or earlier if the mint sells out. After that, that game will be put into a short idle phase until the official game’s start time. This pause between the mint and the beginning of the game allows the players to familiarize themselves with the game, strategize, and buy/sell agents prior to the game beginning.

Phase II - Breach

The main action of the game occurs in this phase. The players can view game progress, including the prize pot, number of active and wounded agents, current round actions and more. A player’s agents can be managed through the Squad page or by interacting directly with the contract. Agents have the option of escaping from the game to receive an ETH reward based on the number of agents left. Wounded agents can also be healed using LOOKS or ETH. If the ETH option is selected, the contract will buy the required LOOKS amount in the same transaction to use for healing.

Phase III - Endgame

This final phase starts when only 50 active agents are left. In this phase, one agent dies each round. Agents are still able to escape if they wish, however healing is disabled. All agents within the top 50 will win a secondary prize. Meanwhile, the last agent remaining wins both a secondary prize and a significant primary prize.

Deployed Contracts

Here’s a list of all the LooksRare deployed contracts used for the INFILTRATION game:

ContractEthereum Mainnet
InfiltrationTBD
InfiltrationPeripheryTBD
TransferManager0x00000000000ea4af05656C17b90f4d64AdD29e1d (view on Etherscan)
LOOKS0xf4d2888d29D722226FafA5d9B24F9164c092421E (view on Etherscan)

Contracts Interactions

There are a few actions players can take during the game, all of which can be executed directly by calling the contract on-chain programmatically. Here is an overview of each of the possible player interactions:

Round Transition Block

Most player actions are blocked during the round transition (while we wait for Chainlink to fulfil the randomness request). Here’s how to verify if the player actions are currently blocked:

  • Call the gameInfo view function to get the currentRoundBlockNumber
  • Get the current block number via your provider, let’s call it currentBlockNumber
  • If currentBlockNumber >= currentRoundBlockNumber + 35, player actions could be blocked.

Mint

This action can be performed by calling the mint function on the contract and specifying the amount of tokens to mint. The caller must take care to send the correct amount of ETH; this can be calculated using the value defined in the PRICE constant multiplied by the number of agents to mint.

Infiltration contract:

function mint(uint256 quantity) external payable;

Escape

Players can escape agents via the contract by calling the escape function on the contract and providing the agents' IDs as an array. This function can only be called during a round, after the game has begun, and not within a round transitions period.

  • The msg.sender must own the agents.

  • The player will a receive a reward based on the number of agents left.

Infiltration contract:

function escape(uint256[] calldata agentIds) external;

Heal

Players can request healing for their wounded agents via the contract by calling the heal function either on the main game contract (if paid in LOOKS) or via the InfiltrationPeriphery contract (if paid in ETH) and providing the agents' IDs as an array. This function can only be called during a round, not during round transitions.

The amount of LOOKS/ETH required to heal can be obtained by calling costToHeal. When paying in ETH, the excess amount is refunded, while with LOOKS, only the right amount is taken by the contract.

The contract burns 25% of the LOOKS used to pay for the healing request, while the remaining 75% is added to the secondary LOOKS prize pool used to reward the top 50 agents.

Infiltration contract:

function costToHeal(uint256[] calldata agentIds) external view returns (uint256 cost); // Cost in LOOKS

function heal(uint256[] calldata agentIds) external; // LOOKS version

InfiltrationPeriphery contract:

function costToHeal(uint256[] calldata agentIds) external returns (uint256 costToHealInETH); // Cost in ETH

function heal(uint256[] calldata agentIds) external payable // ETH version

Heal Approvals

Approvals are required to pay directly in LOOKS. These can be sorted by calling grantApprovals on the TransferManager contract, and then the standard approve function on the LOOKS contract with the operator set to the TransferManager.

These approvals are required only once per wallet.

TransferManager contract:

function grantApprovals(address[] calldata operators) external; // The operator is the Infiltration contract.

LOOKS contract:

function approve(address spender, uint256 amount) external; // The spender is the TransferManager contract.

Audit Report and Security Assurance

At LooksRare, security is a top priority. The Infiltration smart contract has been rigorously audited by a group of third-party auditors via a public contest using the Sherlock protocol to ensure the highest level of safety and reliability. The audit assesses the contract for potential vulnerabilities and compliance with best practices in the blockchain industry.

We are committed to maintaining the highest security standards and to continuously improving our smart contract infrastructure responsibly; below is the audit report for the LooksRare INFILTRATION game:

Sherlock

Audit Report: here