This is the report from a security audit performed on 2key by MrCrambo.
The audit focused primarily on the security of 2key smart contracts.
- https://github.com/2key/contracts/blob/7aa8485ef3dc44e7fa443eb62d6ed75a86fc4ebe/contracts/2key/interfaces/storage-contracts/ITwoKeyAdminStorage.sol
- https://github.com/2key/contracts/blob/7aa8485ef3dc44e7fa443eb62d6ed75a86fc4ebe/contracts/2key/interfaces/storage-contracts/ITwoKeyBaseReputationRegistryStorage.sol
- https://github.com/2key/contracts/blob/7aa8485ef3dc44e7fa443eb62d6ed75a86fc4ebe/contracts/2key/interfaces/storage-contracts/ITwoKeyCampaignValidatorStorage.sol
- https://github.com/2key/contracts/blob/7aa8485ef3dc44e7fa443eb62d6ed75a86fc4ebe/contracts/2key/interfaces/storage-contracts/ITwoKeyCommunityTokenPoolStorage.sol
- https://github.com/2key/contracts/blob/7aa8485ef3dc44e7fa443eb62d6ed75a86fc4ebe/contracts/2key/interfaces/storage-contracts/ITwoKeyDeepFreezeTokenPoolStorage.sol
- https://github.com/2key/contracts/blob/7aa8485ef3dc44e7fa443eb62d6ed75a86fc4ebe/contracts/2key/interfaces/storage-contracts/ITwoKeyEventSourceStorage.sol
- https://github.com/2key/contracts/blob/7aa8485ef3dc44e7fa443eb62d6ed75a86fc4ebe/contracts/2key/interfaces/storage-contracts/ITwoKeyExchangeRateContractStorage.sol
- https://github.com/2key/contracts/blob/7aa8485ef3dc44e7fa443eb62d6ed75a86fc4ebe/contracts/2key/interfaces/storage-contracts/ITwoKeyFactoryStorage.sol
- https://github.com/2key/contracts/blob/7aa8485ef3dc44e7fa443eb62d6ed75a86fc4ebe/contracts/2key/interfaces/storage-contracts/ITwoKeyLongTermTokenPoolStorage.sol
- https://github.com/2key/contracts/blob/7aa8485ef3dc44e7fa443eb62d6ed75a86fc4ebe/contracts/2key/interfaces/storage-contracts/ITwoKeyMaintainersRegistryStorage.sol
- https://github.com/2key/contracts/blob/7aa8485ef3dc44e7fa443eb62d6ed75a86fc4ebe/contracts/2key/interfaces/storage-contracts/ITwoKeyPlasmaEventsStorage.sol
- https://github.com/2key/contracts/blob/7aa8485ef3dc44e7fa443eb62d6ed75a86fc4ebe/contracts/2key/interfaces/storage-contracts/ITwoKeyPlasmaMaintainersRegistryStorage.sol
- https://github.com/2key/contracts/blob/7aa8485ef3dc44e7fa443eb62d6ed75a86fc4ebe/contracts/2key/interfaces/storage-contracts/ITwoKeyPlasmaRegistryStorage.sol
- https://github.com/2key/contracts/blob/7aa8485ef3dc44e7fa443eb62d6ed75a86fc4ebe/contracts/2key/interfaces/storage-contracts/ITwoKeyRegistryStorage.sol
- https://github.com/2key/contracts/blob/7aa8485ef3dc44e7fa443eb62d6ed75a86fc4ebe/contracts/2key/interfaces/storage-contracts/ITwoKeySignatureValidatorStorage.sol
- https://github.com/2key/contracts/blob/7aa8485ef3dc44e7fa443eb62d6ed75a86fc4ebe/contracts/2key/interfaces/storage-contracts/ITwoKeyUpgradableExchangeStorage.sol
- https://github.com/2key/contracts/blob/7aa8485ef3dc44e7fa443eb62d6ed75a86fc4ebe/contracts/2key/interfaces/IDecentralizedNation.sol
- https://github.com/2key/contracts/blob/7aa8485ef3dc44e7fa443eb62d6ed75a86fc4ebe/contracts/2key/interfaces/IERC20.sol
- https://github.com/2key/contracts/blob/7aa8485ef3dc44e7fa443eb62d6ed75a86fc4ebe//contracts/2key/interfaces/IGetImplementation.sol
- https://github.com/2key/contracts/blob/7aa8485ef3dc44e7fa443eb62d6ed75a86fc4ebe/contracts/2key/interfaces/IHandleCampaignDeployment.sol
- https://github.com/2key/contracts/blob/7aa8485ef3dc44e7fa443eb62d6ed75a86fc4ebe/contracts/2key/interfaces/IKyberNetworkProxy.sol
- https://github.com/2key/contracts/blob/7aa8485ef3dc44e7fa443eb62d6ed75a86fc4ebe/contracts/2key/interfaces/IMaintainingPattern.sol
- https://github.com/2key/contracts/blob/7aa8485ef3dc44e7fa443eb62d6ed75a86fc4ebe/contracts/2key/interfaces/IStructuredStorage.sol
- https://github.com/2key/contracts/blob/7aa8485ef3dc44e7fa443eb62d6ed75a86fc4ebe/contracts/2key/interfaces/ITwoKeyAcquisitionARC.sol
- https://github.com/2key/contracts/blob/7aa8485ef3dc44e7fa443eb62d6ed75a86fc4ebe/contracts/2key/interfaces/ITwoKeyAcquisitionCampaignERC20.sol
- https://github.com/2key/contracts/blob/7aa8485ef3dc44e7fa443eb62d6ed75a86fc4ebe/contracts/2key/interfaces/ITwoKeyAcquisitionLogicHandler.sol
- https://github.com/2key/contracts/blob/7aa8485ef3dc44e7fa443eb62d6ed75a86fc4ebe/contracts/2key/interfaces/ITwoKeyAdmin.sol
- https://github.com/2key/contracts/blob/7aa8485ef3dc44e7fa443eb62d6ed75a86fc4ebe/contracts/2key/interfaces/ITwoKeyBaseReputationRegistry.sol
- https://github.com/2key/contracts/blob/7aa8485ef3dc44e7fa443eb62d6ed75a86fc4ebe/contracts/2key/interfaces/ITwoKeyCampaignGetReferrers.sol
- https://github.com/2key/contracts/blob/7aa8485ef3dc44e7fa443eb62d6ed75a86fc4ebe/contracts/2key/interfaces/ITwoKeyCampaignPublicAddresses.sol
- https://github.com/2key/contracts/blob/7aa8485ef3dc44e7fa443eb62d6ed75a86fc4ebe/contracts/2key/interfaces/ITwoKeyCampaignValidator.sol
- https://github.com/2key/contracts/blob/7aa8485ef3dc44e7fa443eb62d6ed75a86fc4ebe/contracts/2key/interfaces/ITwoKeyConversionHandler.sol
- https://github.com/2key/contracts/blob/7aa8485ef3dc44e7fa443eb62d6ed75a86fc4ebe/contracts/2key/interfaces/ITwoKeyConversionHandlerGetConverterState.sol
- https://github.com/2key/contracts/blob/7aa8485ef3dc44e7fa443eb62d6ed75a86fc4ebe/contracts/2key/interfaces/ITwoKeyDonationCampaign.sol
- https://github.com/2key/contracts/blob/7aa8485ef3dc44e7fa443eb62d6ed75a86fc4ebe/contracts/2key/interfaces/ITwoKeyDonationCampaignFetchAddresses.sol
- https://github.com/2key/contracts/blob/7aa8485ef3dc44e7fa443eb62d6ed75a86fc4ebe/contracts/2key/interfaces/ITwoKeyDonationConversionHandler.sol
- https://github.com/2key/contracts/blob/7aa8485ef3dc44e7fa443eb62d6ed75a86fc4ebe/contracts/2key/interfaces/ITwoKeyDonationLogicHandler.sol
- https://github.com/2key/contracts/blob/7aa8485ef3dc44e7fa443eb62d6ed75a86fc4ebe/contracts/2key/interfaces/ITwoKeyEventSource.sol
- https://github.com/2key/contracts/blob/7aa8485ef3dc44e7fa443eb62d6ed75a86fc4ebe/contracts/2key/interfaces/ITwoKeyEventSourceEvents.sol
- https://github.com/2key/contracts/blob/7aa8485ef3dc44e7fa443eb62d6ed75a86fc4ebe/contracts/2key/interfaces/ITwoKeyExchangeRateContract.sol
- https://github.com/2key/contracts/blob/7aa8485ef3dc44e7fa443eb62d6ed75a86fc4ebe/contracts/2key/interfaces/ITwoKeyMaintainersRegistry.sol
- https://github.com/2key/contracts/blob/7aa8485ef3dc44e7fa443eb62d6ed75a86fc4ebe/contracts/2key/interfaces/ITwoKeyPlasmaEvents.sol
- https://github.com/2key/contracts/blob/7aa8485ef3dc44e7fa443eb62d6ed75a86fc4ebe/contracts/2key/interfaces/ITwoKeyPlasmaRegistry.sol
- https://github.com/2key/contracts/blob/7aa8485ef3dc44e7fa443eb62d6ed75a86fc4ebe/contracts/2key/interfaces/ITwoKeyPurchasesHandler.sol
- https://github.com/2key/contracts/blob/7aa8485ef3dc44e7fa443eb62d6ed75a86fc4ebe/contracts/2key/interfaces/ITwoKeyReg.sol
- https://github.com/2key/contracts/blob/7aa8485ef3dc44e7fa443eb62d6ed75a86fc4ebe/contracts/2key/interfaces/ITwoKeyRegistry.sol
- https://github.com/2key/contracts/blob/7aa8485ef3dc44e7fa443eb62d6ed75a86fc4ebe/contracts/2key/interfaces/ITwoKeyRegistryEvents.sol
- https://github.com/2key/contracts/blob/7aa8485ef3dc44e7fa443eb62d6ed75a86fc4ebe/contracts/2key/interfaces/ITwoKeySingletoneAddressStorage.sol
- https://github.com/2key/contracts/blob/7aa8485ef3dc44e7fa443eb62d6ed75a86fc4ebe/contracts/2key/interfaces/ITwoKeySingletoneRegistryFetchAddress.sol
- https://github.com/2key/contracts/blob/7aa8485ef3dc44e7fa443eb62d6ed75a86fc4ebe/contracts/2key/interfaces/ITwoKeySingletonesRegistry.sol
- https://github.com/2key/contracts/blob/7aa8485ef3dc44e7fa443eb62d6ed75a86fc4ebe/contracts/2key/interfaces/ITwoKeyWeightedVoteContract.sol
- https://github.com/2key/contracts/blob/7aa8485ef3dc44e7fa443eb62d6ed75a86fc4ebe/contracts/2key/interfaces/IUpgradableExchange.sol
- https://github.com/2key/contracts/blob/7aa8485ef3dc44e7fa443eb62d6ed75a86fc4ebe/contracts/2key/libraries/Call.sol
- https://github.com/2key/contracts/blob/7aa8485ef3dc44e7fa443eb62d6ed75a86fc4ebe/contracts/2key/libraries/GetCode.sol
- https://github.com/2key/contracts/blob/7aa8485ef3dc44e7fa443eb62d6ed75a86fc4ebe/contracts/2key/libraries/IncentiveModels.sol
- https://github.com/2key/contracts/blob/7aa8485ef3dc44e7fa443eb62d6ed75a86fc4ebe/contracts/2key/libraries/SafeERC20.sol
- https://github.com/2key/contracts/blob/7aa8485ef3dc44e7fa443eb62d6ed75a86fc4ebe/contracts/2key/libraries/SafeMath.sol
- https://github.com/2key/contracts/blob/7aa8485ef3dc44e7fa443eb62d6ed75a86fc4ebe/contracts/2key/libraries/Utils.sol
- https://github.com/2key/contracts/blob/7aa8485ef3dc44e7fa443eb62d6ed75a86fc4ebe/contracts/2key/token-pools/TokenPool.sol
- https://github.com/2key/contracts/blob/7aa8485ef3dc44e7fa443eb62d6ed75a86fc4ebe/contracts/2key/token-pools/TwoKeyCommunityTokenPool.sol
- https://github.com/2key/contracts/blob/7aa8485ef3dc44e7fa443eb62d6ed75a86fc4ebe/contracts/2key/token-pools/TwoKeyDeepFreezeTokenPool.sol
- https://github.com/2key/contracts/blob/7aa8485ef3dc44e7fa443eb62d6ed75a86fc4ebe/contracts/2key/token-pools/TwoKeyLongTermTokenPool.sol
- https://github.com/2key/contracts/blob/c85f3e1f3a04c56afd28bf673758367cc3df6609/contracts/2key/singleton-contracts/ITwoKeySingletonUtils.sol
- https://github.com/2key/contracts/blob/c85f3e1f3a04c56afd28bf673758367cc3df6609/contracts/2key/singleton-contracts/StandardTokenModified.sol
- https://github.com/2key/contracts/blob/c85f3e1f3a04c56afd28bf673758367cc3df6609/contracts/2key/singleton-contracts/TwoKeyAdmin.sol
- https://github.com/2key/contracts/blob/c85f3e1f3a04c56afd28bf673758367cc3df6609/contracts/2key/singleton-contracts/TwoKeyBaseReputationRegistry.sol
- https://github.com/2key/contracts/blob/c85f3e1f3a04c56afd28bf673758367cc3df6609/contracts/2key/singleton-contracts/TwoKeyCampaignValidator.sol
- https://github.com/2key/contracts/blob/c85f3e1f3a04c56afd28bf673758367cc3df6609/contracts/2key/singleton-contracts/TwoKeyCongress.sol#L180
- https://github.com/2key/contracts/blob/c85f3e1f3a04c56afd28bf673758367cc3df6609/contracts/2key/singleton-contracts/TwoKeyEconomy.sol
- https://github.com/2key/contracts/blob/c85f3e1f3a04c56afd28bf673758367cc3df6609/contracts/2key/singleton-contracts/TwoKeyEventSource.sol
- https://github.com/2key/contracts/blob/c85f3e1f3a04c56afd28bf673758367cc3df6609/contracts/2key/singleton-contracts/TwoKeyExchangeRateContract.sol
- https://github.com/2key/contracts/blob/c85f3e1f3a04c56afd28bf673758367cc3df6609/contracts/2key/singleton-contracts/TwoKeyFactory.sol
- https://github.com/2key/contracts/blob/c85f3e1f3a04c56afd28bf673758367cc3df6609/contracts/2key/singleton-contracts/TwoKeyLockupContract.sol
- https://github.com/2key/contracts/blob/c85f3e1f3a04c56afd28bf673758367cc3df6609/contracts/2key/singleton-contracts/TwoKeyMaintainersRegistry.sol
- https://github.com/2key/contracts/blob/c85f3e1f3a04c56afd28bf673758367cc3df6609/contracts/2key/singleton-contracts/TwoKeyPlasmaEvents.sol
- https://github.com/2key/contracts/blob/c85f3e1f3a04c56afd28bf673758367cc3df6609/contracts/2key/singleton-contracts/TwoKeyPlasmaMaintainersRegistry.sol
- https://github.com/2key/contracts/blob/c85f3e1f3a04c56afd28bf673758367cc3df6609/contracts/2key/singleton-contracts/TwoKeyPlasmaRegistry.sol
- https://github.com/2key/contracts/blob/c85f3e1f3a04c56afd28bf673758367cc3df6609/contracts/2key/singleton-contracts/TwoKeyPlasmaSingletoneRegistry.sol
- https://github.com/2key/contracts/blob/c85f3e1f3a04c56afd28bf673758367cc3df6609/contracts/2key/singleton-contracts/TwoKeyRegistry.sol
- https://github.com/2key/contracts/blob/c85f3e1f3a04c56afd28bf673758367cc3df6609/contracts/2key/singleton-contracts/TwoKeySignatureValidator.sol
- https://github.com/2key/contracts/blob/c85f3e1f3a04c56afd28bf673758367cc3df6609/contracts/2key/singleton-contracts/TwoKeySingletonesRegistry.sol
- https://github.com/2key/contracts/blob/c85f3e1f3a04c56afd28bf673758367cc3df6609/contracts/2key/singleton-contracts/TwoKeyUpgradableExchange.sol
- https://github.com/2key/contracts/blob/c85f3e1f3a04c56afd28bf673758367cc3df6609/contracts/2key/singleton-storage-contracts/TwoKeyAdminStorage.sol
- https://github.com/2key/contracts/blob/c85f3e1f3a04c56afd28bf673758367cc3df6609/contracts/2key/singleton-storage-contracts/TwoKeyBaseReputationRegistryStorage.sol
- https://github.com/2key/contracts/blob/c85f3e1f3a04c56afd28bf673758367cc3df6609/contracts/2key/singleton-storage-contracts/TwoKeyCampaignValidatorStorage.sol
- https://github.com/2key/contracts/blob/c85f3e1f3a04c56afd28bf673758367cc3df6609/contracts/2key/singleton-storage-contracts/TwoKeyCommunityTokenPoolStorage.sol
- https://github.com/2key/contracts/blob/c85f3e1f3a04c56afd28bf673758367cc3df6609/contracts/2key/singleton-storage-contracts/TwoKeyDeepFreezeTokenPoolStorage.sol
- https://github.com/2key/contracts/blob/c85f3e1f3a04c56afd28bf673758367cc3df6609/contracts/2key/singleton-storage-contracts/TwoKeyEventSourceStorage.sol
- https://github.com/2key/contracts/blob/c85f3e1f3a04c56afd28bf673758367cc3df6609/contracts/2key/singleton-storage-contracts/TwoKeyExchangeRateStorage.sol
- https://github.com/2key/contracts/blob/c85f3e1f3a04c56afd28bf673758367cc3df6609/contracts/2key/singleton-storage-contracts/TwoKeyFactoryStorage.sol
- https://github.com/2key/contracts/blob/c85f3e1f3a04c56afd28bf673758367cc3df6609/contracts/2key/singleton-storage-contracts/TwoKeyLongTermTokenPoolStorage.sol
- https://github.com/2key/contracts/blob/c85f3e1f3a04c56afd28bf673758367cc3df6609/contracts/2key/singleton-storage-contracts/TwoKeyMaintainersRegistryStorage.sol
- https://github.com/2key/contracts/blob/c85f3e1f3a04c56afd28bf673758367cc3df6609/contracts/2key/singleton-storage-contracts/TwoKeyPlasmaEventsStorage.sol
- https://github.com/2key/contracts/blob/c85f3e1f3a04c56afd28bf673758367cc3df6609/contracts/2key/singleton-storage-contracts/TwoKeyPlasmaMaintainersRegistryStorage.sol
- https://github.com/2key/contracts/blob/c85f3e1f3a04c56afd28bf673758367cc3df6609/contracts/2key/singleton-storage-contracts/TwoKeyPlasmaRegistryStorage.sol
- https://github.com/2key/contracts/blob/c85f3e1f3a04c56afd28bf673758367cc3df6609/contracts/2key/singleton-storage-contracts/TwoKeyRegistryStorage.sol
- https://github.com/2key/contracts/blob/c85f3e1f3a04c56afd28bf673758367cc3df6609/contracts/2key/singleton-storage-contracts/TwoKeySignatureValidatorStorage.sol
- https://github.com/2key/contracts/blob/c85f3e1f3a04c56afd28bf673758367cc3df6609/contracts/2key/singleton-storage-contracts/TwoKeyUpgradableExchangeStorage.sol
- https://github.com/2key/contracts/blob/c85f3e1f3a04c56afd28bf673758367cc3df6609/contracts/2key/upgradability/Proxy.sol
- https://github.com/2key/contracts/blob/c85f3e1f3a04c56afd28bf673758367cc3df6609/contracts/2key/upgradability/StructuredStorage.sol
- https://github.com/2key/contracts/blob/c85f3e1f3a04c56afd28bf673758367cc3df6609/contracts/2key/upgradability/UpgradabilityProxy.sol
- https://github.com/2key/contracts/blob/c85f3e1f3a04c56afd28bf673758367cc3df6609/contracts/2key/upgradability/UpgradabilityStorage.sol
- https://github.com/2key/contracts/blob/c85f3e1f3a04c56afd28bf673758367cc3df6609/contracts/2key/upgradability/Upgradeable.sol
- https://github.com/2key/contracts/blob/c85f3e1f3a04c56afd28bf673758367cc3df6609/contracts/2key/upgradable-pattern-campaigns/ProxyCampaign.sol
- https://github.com/2key/contracts/blob/c85f3e1f3a04c56afd28bf673758367cc3df6609/contracts/2key/upgradable-pattern-campaigns/UpgradabilityCampaignStorage.sol
- https://github.com/2key/contracts/blob/c85f3e1f3a04c56afd28bf673758367cc3df6609/contracts/2key/upgradable-pattern-campaigns/UpgradeableCampaign.sol
- https://github.com/2key/contracts/blob/c85f3e1f3a04c56afd28bf673758367cc3df6609/contracts/2key/donation-campaign-contracts/ERC20.sol
- https://github.com/2key/contracts/blob/c85f3e1f3a04c56afd28bf673758367cc3df6609/contracts/2key/donation-campaign-contracts/InvoiceTokenERC20.sol
- https://github.com/2key/contracts/blob/c85f3e1f3a04c56afd28bf673758367cc3df6609/contracts/2key/donation-campaign-contracts/TwoKeyDonationCampaign.sol
- https://github.com/2key/contracts/blob/c85f3e1f3a04c56afd28bf673758367cc3df6609/contracts/2key/donation-campaign-contracts/TwoKeyDonationCampaignType.sol
- https://github.com/2key/contracts/blob/c85f3e1f3a04c56afd28bf673758367cc3df6609/contracts/2key/donation-campaign-contracts/TwoKeyDonationConversionHandler.sol
- https://github.com/2key/contracts/blob/c85f3e1f3a04c56afd28bf673758367cc3df6609/contracts/2key/donation-campaign-contracts/TwoKeyDonationLogicHandler.sol
- https://github.com/2key/contracts/blob/c85f3e1f3a04c56afd28bf673758367cc3df6609/contracts/2key/campaign-mutual-contracts/ArcERC20.sol
- https://github.com/2key/contracts/blob/c85f3e1f3a04c56afd28bf673758367cc3df6609/contracts/2key/campaign-mutual-contracts/TwoKeyCampaign.sol
- https://github.com/2key/contracts/blob/c85f3e1f3a04c56afd28bf673758367cc3df6609/contracts/2key/campaign-mutual-contracts/TwoKeyCampaignIncentiveModels.sol
- https://github.com/2key/contracts/blob/c85f3e1f3a04c56afd28bf673758367cc3df6609/contracts/2key/acquisition-campaign-contracts/TwoKeyAcquisitionCampaignERC20.sol
- https://github.com/2key/contracts/blob/c85f3e1f3a04c56afd28bf673758367cc3df6609/contracts/2key/acquisition-campaign-contracts/TwoKeyAcquisitionLogicHandler.sol
- https://github.com/2key/contracts/blob/c85f3e1f3a04c56afd28bf673758367cc3df6609/contracts/2key/acquisition-campaign-contracts/TwoKeyConversionHandler.sol
- https://github.com/2key/contracts/blob/c85f3e1f3a04c56afd28bf673758367cc3df6609/contracts/2key/acquisition-campaign-contracts/TwoKeyPurchasesHandler.sol
- https://github.com/2key/contracts/blob/c85f3e1f3a04c56afd28bf673758367cc3df6609/contracts/2key/DecentralizedNation.sol
- https://github.com/2key/contracts/blob/c85f3e1f3a04c56afd28bf673758367cc3df6609/contracts/2key/ERC20CustomToken.sol
- https://github.com/2key/contracts/blob/c85f3e1f3a04c56afd28bf673758367cc3df6609/contracts/2key/ERC20TokenMock.sol
- https://github.com/2key/contracts/blob/c85f3e1f3a04c56afd28bf673758367cc3df6609/contracts/2key/Ownable.sol
- https://github.com/2key/contracts/blob/c85f3e1f3a04c56afd28bf673758367cc3df6609/contracts/2key/TwoKeyAirdropCampaign.sol
- https://github.com/2key/contracts/blob/c85f3e1f3a04c56afd28bf673758367cc3df6609/contracts/2key/TwoKeyConversionStates.sol
- https://github.com/2key/contracts/blob/c85f3e1f3a04c56afd28bf673758367cc3df6609/contracts/2key/TwoKeyConverterStates.sol
- https://github.com/2key/contracts/blob/c85f3e1f3a04c56afd28bf673758367cc3df6609/contracts/2key/TwoKeyTypes.sol
- https://github.com/2key/contracts/blob/c85f3e1f3a04c56afd28bf673758367cc3df6609/contracts/2key/TwoKeyVoteToken.sol
- https://github.com/2key/contracts/blob/c85f3e1f3a04c56afd28bf673758367cc3df6609/contracts/2key/UpgradabilityProxyAcquisition.sol
In total, 26 issues were reported including:
-
1 critical severity issues.
-
1 high severity issues.
-
7 medium severity issues.
-
9 owner privilegies issues.
-
6 low severity issues.
-
2 notes.
- Owner can freeze
transfer
andtransferFrom
functions any time without any restrictions. - Owner can change voting rules without any restrictions and checking conditions in lines 312 and 313
- Owner can add new implementation of contract without any restrictions, there is possibility that this contracts will be not audited and will contain issues.
- Owner can change any
uint
value in TwoKeyUpgradableExchange contract as buy and sell rates,weiRaised
valuet etc. - Owner can change proxy logic contract any times and chan change it to not audited contract.
- Owner can add value to
contractorBalance
and tocontractorTotalProceeds
any time without restrictions. - Owner can add value to
contractorBalance
and tocontractorTotalProceeds
any time without restrictions. - Owner can change min contribution value and max contribution value any time without any checking and also there is no event call after chaning, but should be as described in functions description.
- Owner can add any contract and allow it, so this contracts could be not audited.
ERC-20 interface contract should include totalSupply
and allowance
functions.
Add totalSupply
and allowance
functions to the contract.
In function setInitialParams
there is no zero address checking for _erc20Address
and twoKeySingletonesRegistry
. Other function links in Code snippets
.
Add zero address checking.
require(_erc20Address != address(0));
require(twoKeySingletonesRegistry != address(0));
In function setInitialParams
there is wrong value passing to function setInitialParameters(_erc20Address, TWO_KEY_SINGLETON_REGISTRY);
, because in all other similar functions there is passing value from arguments of functions and also TWO_KEY_SINGLETON_REGISTRY
variable not initialized in this contract.
There should be passed twoKeySingletonesRegistry
instead of TWO_KEY_SINGLETON_REGISTRY
.
setInitialParameters(_erc20Address, twoKeySingletonesRegistry);
In constructor
there is possibility that arrays initialMembers
, initialMemberNames
and votingPowers
will have different sizes. Other functions with similar issue below in Code snippets
- In function
setMultipleFiatCurrencyDetails
arrays_currencies
andbaseToTargetRates
.
Add checking, that arrays' sizes are equal.
require(initialMembers.length == initialMemberNames.length && initialMemberNames.length == votingPowers.length)
In function replaceMemberAddress
there is setting old member info to new address in line 199, but memberAddress
will still be old address, which should be replaced.
Create new Member
struct for replaced address with copying memberSince
, votingPower
and name
.
In function changeTokenDistributionDate
there is possibility of increasing date instead of decreasing, if newDate
will be less than tokenDistributionDate
. So new dates will be few days sooner instead of earlier.
Same issue occur in function changeDistributionDate
in TwoKeyPurchasesHandler.sol
contract
Use this code instead of current:
tokenUnlockingDate[i] = tokenUnlockingDate[i] - shift;
There are lot of TODO
comments left in code.
Fallback function is empty, but should call buyTokens
function from this contract.
Add code below into fallback function.
buyTokens(msg.sender);
There is no Transfer
even call in construtor
after transfering funds to owner.
Add following code to constructor
after setting owner balance equal to totalSupply_
emit Transfer(address(0), msg.sender, totalSupply_);
- In function
createConversion
there is possiblity of truncated value in line 233 - In function
getHowMuchLeftForUserToSpend
there is truncation possibility in line 121 soleftToSpendInFiats
will show wrong amount.
uint totalAmountSpentConvertedToFIAT = (alreadyDonatedEthWEI*rate).div(10**18);
uint limit = maxDonationAmountWei;
uint leftToSpendInFiats = limit.sub(totalAmountSpentConvertedToFIAT);
- In function
updateRefchainRewards
there is truncation possibility in lines 201 and 203, soupdateReferrerMappings(influencers[i], b, _conversionId);
will use wrongb
value in line 207. - In line 342 in function
buyTokensAndDistributeReferrerRewards
there could be truncation, so valuereservedAmount2keyForRewards
will be wrong.
totalBounty2keys = (_maxReferralRewardETHWei / (rate)) * (1000);
reservedAmount2keyForRewards = reservedAmount2keyForRewards.add(totalBounty2keys);
In function getReferrers
there is possibility of out of gas error, because there is two while
loops with another contract function call and in case n_influencers
will be more than few thousands there could occur this error.
Similar issue in TwoKeyAcquisitionLogicHandler.sol contract.
In function transferFrom
there is adding conversionQuota
to _to
address balance, where conversionQuota
is maximal ARC tokens that can be passed in transferFrom
, but value
will always be equal to 1. So in this function there will not be transfering tokens from one address to another, there will be burning from one and minting to another.
There is no checking that there will be enough tokens in line 344 in function buyTokensAndDistributeReferrerRewards
as writed in TODO
comment.
//TODO: add require that there's enough tokens at this moment
Add checking that there is enough tokens.
In function isCampaignEnded
there is possiblity that campaignRaisedAlready
will be more than campaignHardCapWei
so in this case this function will retun false.
Check that campaignRaisedAlready
is at least equal to campaignHardCapWei
.
if(endCampaignWhenHardCapReached == true && campaignRaisedAlready >= campaignHardCapWei) {
return true;
}
If
statement in constructor
has no code inside of it and could be deleted.
Using function transferFrom
anyone can transfer other addresses voting points to himself. There is no checking for person who call this function, so he can pass his address as to
address and transfer himself anyones' voting points.
Better to use transfer
function so only voting points' owners will be able to transfer their voting points.
Function allowance
show balanceOf
functions' result and doesn't show the amount of tokens that an owner allowed to a spender.
as writed in comment above function.
Smart contracts contain critical and high severity issues, please fix it before deploying.