Affyn Land

CertiKFiles named in the report

CertiK reviewed Affyn (Affyn Land) on 7 Oct 2022: 17 findings, 0 critical; 11 marked fixed, 1 acknowledged, 5 open.

No open critical findings
Open the reportOpen Affyn’s security record

Report hosted on skynet.certik.com.

Trustblock does not review code.

Findings17

Statuses are the security firm’s own, from its report.

SeverityOpenAcknowledgedFixed
Critical000
High010
Medium000
Low5011
LowDeclaration Naming ConventionOpen

One or more declarations do not conform to the [Solidity style guide](https://solidity.readthedocs.io/en/v0.7.3/style-guide.html#naming-conventions) with regards to its naming convention. Particularly: - `camelCase`: Should be applied to function names, argument names, local and state variable names, modifiers - `UPPER_CASE`: Should be applied to `constant` variables - `CapWords`: Should be applied to contract names, struct names, event names and enums In AccessPassContract.sol: ```solidity=776 IERC20 private constant affynToken = IERC20(0x3B56a704C01D650147ADE2b8cEE594066b3F9421); ``` - Constant variable `affynToken` is not in `UPPER_CASE`. --- In LandAndFlagContract.sol: --- ```solidity=2561 interface iAccessPass { ``` - Contract `iAccessPass` is not in `CapWords`. --- ```solidity=2569 IERC20 private constant affynToken = IERC20(0x3B56a704C01D650147ADE2b8cEE594066b3F9421); ``` - Constant variable `affynToken` is not in `UPPER_CASE`. --- ```solidity=2583 uint256 public MAX_FLAGS_PER_USER = 55; ``` - Variable `MAX_FLAGS_PER_USER` is not in `camelCase`. --- ```solidity=2585 uint256 public TOTAL_FLAG_SUPPLY_LIMITS = 31670; ``` - Variable `TOTAL_FLAG_SUPPLY_LIMITS` is not in `camelCase`. --- ```solidity=2586 uint256 public PRESALE_TOTAL_FLAG_SUPPLY_LIMITS = 20000; ``` - Variable `PRESALE_TOTAL_FLAG_SUPPLY_LIMITS` is not in `camelCase`. --- ```solidity=2587 uint256 public CURRENT_FLAG_SUPPLY = 0; ``` - Variable `CURRENT_FLAG_SUPPLY` is not in `camelCase`. --- ```solidity=2595 uint256 public CURRENT_LAND_SUPPLY = 0; ``` - Variable `CURRENT_LAND_SUPPLY` is not in `camelCase`. --- ```solidity=2596 uint256[4] public LAND_FLAG_COST = [1,3,9,27]; ``` - Variable `LAND_FLAG_COST` is not in `camelCase`. --- ```solidity=2599 mapping(uint256 => mapping(uint256 => uint256)) LAND_SALE_LIMITS; ``` - Variable `LAND_SALE_LIMITS` is not in `camelCase`. --- ```solidity=2600 mapping(uint256 => mapping(uint256 => uint256)) PRESALE_LAND_SALE_LIMITS; ``` - Variable `PRESALE_LAND_SALE_LIMITS` is not in `camelCase`. --- ```solidity=2601 mapping(uint256 => mapping(uint256 => uint256)) CURRENT_LAND_SALE_AMOUNT; ``` - Variable `CURRENT_LAND_SALE_AMOUNT` is not in `camelCase`. --- ```solidity=2602 uint256 public PRIVATE_LAND_SALE_LIMITS = 10040; ``` - Variable `PRIVATE_LAND_SALE_LIMITS` is not in `camelCase`. --- ```solidity=2603 uint256 public CURRENT_PRIVATE_LAND_SALES = 0; ``` - Variable `CURRENT_PRIVATE_LAND_SALES` is not in `camelCase`.

LowDifferent Solidity VersionsOpen

Multiple Solidity versions are used in the codebase. Versions used are `^0.8.4` and `^0.8.0`. --- Furthermore the contract has unlocked compiler version. An unlocked compiler version in the source code of the contract permits the user to compile it at or above a particular version. This, in turn, leads to differences in the generated bytecode between compilations due to differing compiler version numbers. This can lead to an ambiguity when debugging as compiler specific bugs may occur in the codebase that would be hard to identify over a span of multiple compiler versions rather than a specific one.

LowIssues with `PrivateLandSale()`Open

In the function `PrivateLandSale()`: - At the end of the function execution the `MintedLand` event is emitted with the following information: `citySaleIndex` = 999999 and `category` = 999999. This generates inconsistency between the same `MintedLand` events emitted. We recommend creating a specific event for `PrivateLandSale()`. - The possibility of minting private lands should be limited. We recommend setting a time limit beyond which private lands can no longer be minted or make the `PRIVATE_LAND_SALE_LIMITS` value constant with no possibility of it being changed later.

LowMissing checksOpen

Inside `AccessPassContract.sol` the following checks are missing: - In `overwriteReleaseTime()` it is not checked if `newTime` is greater than `block.timestamp`. - In `CreateAndSignupAccess()`, the function `CheckTokenRequirements()` must be called to ensure the msgSender can afford the pass and this contract is allowed to transfer funds to the timelock. Currently `CheckTokenRequirements()` is unused. - In `ModifyDepositAmount()` the input `value` should be greater than zero. If the intended behavior is to revoke an existing pass or just pausing it from being bought by users another specific function must be created in order to separate the functionality. --- Inside `LandAndFlagContract.sol` the following checks are missing: - In `CheckWhitelisted()` before making the call to `MerkleProof.verify()` it should be verified that `whitelistedMerkleRoot` was already set through `setWhitelistMerkleRoots()`. - In `CreateNewCitySale()` before using `currentCitySaleIndex` it is incremented by 1, so it is not possible for it to have a value of zero. Therefore, in all the functions where `citySaleIndex` is passed as an input, it should be check that it is nonzero. - Since the current amount of existing city sales is capped by the current value of `currentCitySaleIndex`, in all functions where `citySaleIndex` is passed as an input parameter it should be verified that it is less than or equal to `currentCitySaleIndex`. - In `setApprovalForAll()` the following check is not made before changing `_operatorApprovals` stored values. ```solidity require(_msgSenderERC721A() != operator, "ERC721: approve to caller"); ``` - In `SetMaxFlagsPerUser()` it is not checked if the `value` passed as input and assigned to `MAX_FLAGS_PER_USER` is greater than any of the current values stored in `LAND_FLAG_COST`. - In `SetRarityFlagPricing()` it is not checked if the `amount` passed as input and assigned to `LAND_FLAG_COST[category]` is lower than the current value stored in `MAX_FLAGS_PER_USER`. - In `SetCitySaleQuota()` it is not checked if the new `quota` assigned to `LAND_SALE_LIMITS[citySaleIndex][category]` is greater or equal than the current value stored in `PRESALE_LAND_SALE_LIMITS[citySaleIndex][category]`. - In `SetCityPreSaleQuota()` it is not checked if the new `quota` assigned to `PRESALE_LAND_SALE_LIMITS[citySaleIndex][category]` is less than or equal to than the current value stored in `LAND_SALE_LIMITS[citySaleIndex][category]`. - In `SetFlagPrice()` there are no upper bound and lower bound checks on `value` passed as input to the function.

LowUser-Defined GettersOpen

The linked functions are equivalent to the compiler-generated getter functions for the respective variables.

Contracts in scope

No deployed address is recorded for this audit.

The report names a repository or files. Open the report to see its scope.

Repository and files the report names (2)

  • LandAndFlagContract.sol
  • AccessPassContract.sol

Part of Affyn’s security record

Affyn
Audits1 audit by 1 firmLast audit Oct 2022, by CertiK.
Critical findingsNo open critical findingsIn 1 report.
Open Affyn’s security record

Security firm

CertiK

1,044 projects reviewed · 1,375 reports · latest May 2025

See CertiK’s audits

Something wrong on this page? A missing report, a wrong date, a finding that was fixed since. Tell us and we check it against its source.

Tell us