Cover photo

Solidity Audit Preparation - Footium@ Sherlock

Footium is a multiplayer football management game where players own and manage a digital football club.

To get involved with the Footium universe one needs to own a Footium club. As a Footium club owner, one will receive:

🎮 GAME ACCESS: Gain access to the game

🏟️ STADIUM: A unique, 3D stadium associated with your club

⚜️ BADGE: A generative club badge that can be upgraded

đź“– LORE: Unique, AI-generated lore for each club, including info on the fanbase, history, and more that can evolve through in-game achievements

đź‘• KIT: Club kit and colors for your team

👨🏻‍🤝‍👨🏾 SQUAD: An initial squad of 20 players of varying positions and ratings

🏫 ACADEMY: An academy that produces new youth players every season

Minted Clubs:

At the moment clubs are only available on secondary markets.

Rarible: https://rarible.com/footium/items

OpenSea: https://opensea.io/collection/footium-football-clubs

Assets

Club NFTs

ERC721 Tokens: https://etherscan.io/token/0x659cf1306edba213d1fb8f9352b4593a82b05d0c

The club NFTs have the below attributes:

  1. Place:

    • Club Colour :

      • League: Each division has $2^n$ leagues, <String as “Division 8, League 136”>

      • Division : 1- 8

        • Stadium Capacity:

        {
          "name": "Swafornbursh",
          "description": "Swafornbursh F.C. is a professional football club based in Swafornbursh.",
          "external_url": "<https://footium.club/ethereum/clubs/624>",
          "image": "ipfs://Qmbs8JSa5hFxoktUcqzeVBqLsaKiSfDcdh3FMpi3NMgj5c/624.svg",
          "attributes": [
            {
              "trait_type": "Place",
              "value": "Swafornbursh"
            },
            {
              "trait_type": "Club colours",
              "value": "Blue and white"
            },
            {
              "trait_type": "League",
              "value": "Division 8 - League 136"
            },
            {
              "display_type": "number",
              "trait_type": "Division",
              "value": 8
            },
            {
              "display_type": "number",
              "trait_type": "Stadium capacity",
              "value": 1730
            }
          ]
        }
        

        More Info: https://footium.gitbook.io/footium-wiki/assets-breakdown/clubs

        Academy

        The academy is how new talent enters the game. All the players enter the game aged 18.

        • New football players up to age 20 are part of academy, bound to the club. Can play in the first team. Not on-chain

        • Greater than 20 are free agents that can be minted into the squad else any club can buy at auction.

        • Owning the player NFT, the club can sell or loan players

        • 10 new academy prospects every season(about a month in realtime).

        • Within each cohort there will be a varied distribution of quality

        • On chain : NFT player and contract

        • Off chain: Academy prospect

        Player Signing

        Club owner wants to sign a youth player on a contract, they mint them as an NFT. This will incur a small minting fee(in footium tokens) that will go toward funding prize pools corresponding to the club’s league

        Infrastructure Investments

        Investing in the club’s facilities such as the stadium and academy to improve their quality.

        • Investing in your academy will increase the average quality of players produced.

        • Investing in your stadium will give you the ability to upgrade its appearance and capacity, and also give your team a larger home advantage during home games.

        Coaching and Specialisation

        No specific details

        Stadium

        Each Footium club comes with a generative, upgradable 3D stadium — no NFT

        Customizable and Upgradeable.

        Home match advantage

        Customisation and Upgrades

        Club owners will be able

        • to invest capital( via tokens?) to enhance their stadium.

        • Higher division — higher upgradability options. can be earned via in-game rewards

        Impact on Performance

        • The home-ground advantage is a real thing.

        • Big Stadium → Big Crowd → Higher team morale → Higher winning chances

        Sponsorship Opportunities

        Big plans ahead to make Clubs profitable/ operatable via sponsorships

        An artist’s impression of the Footium National Stadium, where the Cup Finals will be played.

        Players

        Every player within the game is an NFT with either generative or bespoke artwork. (Could not find the NFT !!)

        • generative image

        • generated with a number of randomized attributes that ultimately contribute to their overall rating at the time of their minting

        • as well as their potential future overall rating.

        Footium sorts player attributes into how directly they affect the match simulation. These are:

        Influencer Attributes (External): Attributes that correspond to the different game state characteristics

        1. Injury status: Players can get injured which puts them out of action for a few games. Waiting for their condition to recover may be a wise move!

        2. Captain: A team’s captain is instrumental in binding a team together. Within Footium you must pick a captain from your starting eleven. Players have Leadership ratings, and choosing a captain with a high will give your team a boost. Captains serve to improve morale and therefore overall performance.

        3. Training: Training influences players’ performance by improving their skills and teamwork.

        4. Stadium: A great stadium can influence player performance by improving home-ground advantage. This morale indirectly impacts match performance by influencing players’ in-game performance

        Measured Attributes (Indirect): Attributes that correspond to the player’s response to external events.

        1. Positioning: A player can be fielded in any position. However, that player’s rating in his optimal position isn’t necessarily transferrable to other positions. Instead, players have a different rating for every position. The position a player is in during a match isn’t their defining characteristic generally, but it guides their decision-making and the nature of their performance on the pitch.

        2. Mentality

        3. Interceptions

        4. Decision making

        5. Leadership

        Conditional Attributes: Those attributes that indirectly affect match performance by influencing measured attributes. These attributes correspond to changes in the player’s internal and external state and mental and physical states.

        1. Internal StatesMental: Morale: External StatesPhysical: Condition corresponds to how physically fresh or tired a player is when playing a game. During a game, a player’s condition falls, and playing many games consecutively without rest can lead to significantly worsened performance

        2. **ConditionMental: Experience/Familiarity: **Experience is a function of the amount and the quality of a player’s match experience. Players gain experience by playing in matches. This improves the skills of the player, with a bias towards the main skills used in the position they played in for each match. For example, a centre-back will gain a lot of experience in tackling, whilst a center-forward would gain experience shooting.

        Math affecting the in-game match simulation (ELO rating): https://footium.gitbook.io/footium-wiki/assets-breakdown/players/conditional-attributes/condition

        Measured Attributes (Direct): Those attributes that directly affect events in the match

        1. Heading

        2. Shooting

        3. Pace

        4. Dribbling, etc.

        More on direct and indirect attributes here: https://footium.gitbook.io/footium-wiki/assets-breakdown/players/measured-attributes

        Competitions

        League Competitions

        Division: 1–8. (More in the future?)

        Each division has $2^{division-1}$ leagues

        Currently, the bottom of the FFL, Division 8, has 128 leagues of 12 teams (1,536 clubs in Division 8)*(from the doc)

        Note: Clubs in Division 1 cannot be promoted and clubs in Division 8 cannot be relegated.(Check on this ?)

        Games take place every day in seasons of 22 games.

        Cup Competitions

        Some discrepancies in the doc itself with the number of cup competitions. May not be relevant to solidity though. Will wait for further details

        Gameplay

        I do not expect everything to be on the chain. I guess things like the Tactics, Strategy shall be off-chain.

        Prize Pools Sources

        Academy Players

        Signing an academy player as part of the squad requires a “signing-on” fee, which is used for prize pools. Once an unsigned player reaches 21 they become a free agent and can be signed by any club. If you release him, any other club will be able to sign him via an auction.

        • Signing Fee/ minting fee

        Transfer Market

        • Transfer Fees applicable on Payer transfer — 5% → Club’s League prize pool

        Loans

        • Player Loan at a price or free on staking the player asset

        Academy Improvements

        Clubs will be able to purchase more coaching slots for your club, corresponding to how many coaches you can employ at any given time. This goes into the prize pool of the purchasing club’s league.

        Stadium Improvements

        You will be able to upgrade your stadium with larger and more stylistic stands by spending Footium tokens. These fees also flow into the prize pool for your league. Functionally, this permits a larger fanbase**,** leading to better morale and performance for your team, and visually allowing you to flex your club’s prestige.

        Legendary Player Auctions

        Each season we will auction off 20 Legendary players. These players will have bespoke artwork designed by different artists in different styles, as well as strong in-game stats and a high potential maximum rating.

        The revenue generated from sales of Legendary players will go into prize pools split across all divisions.

        Potential to have real-world players as Legendary players in the game in future.

        Sponsorship

        Sponsorship of Footium divisions

        Prize Distribution

        Prizes will be split across the Top 9 teams finishing each league season. The payout of the prize pool for each position will follow the distribution in the table below:

        Position % of Prize Pool Payout 1st 28 2nd 20 3rd 16 4th 10 5th 8 6th 6 7th 5 8th 4 9th 3

        Bottom 3 teams to relegate to the lower division. !st team to automatically promote to the higher division.

        Revenue split

        Initially, all revenue generated in-game will go into the prize pools. In the future.

        Previous Audit History

        None: Juicy fresh bugs.

        Scope

        footium-eth-shareable @ 6c181ea79af7f6715e3891e65ea5ee8def1e957c

        EIPs

        The FootiumEscrow contract complies with the EIP-1271 (Standard Signature Validation Method for Contracts) standard, the purpose is for each club to have its own FootiumEscrow contract deployed, and each contract can create a signature for OpenSea to buy or sell FootiumPlayer NFTs

        ERC20

        ERC721