Phiat

CertiKFiles named in the report

CertiK reviewed Phiat on 13 Apr 2023: 16 findings, 0 critical; 10 marked fixed, 6 open.

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

Report hosted on skynet.certik.com.

Trustblock does not review code.

Findings16

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

SeverityOpenAcknowledgedFixed
Critical000
High200
Medium101
Low309
HighCentralization Related RisksOpen

In the contract `MultiOwnable` the role `_owners` has authority over the functions shown in the diagram below. ![](https://accelerator-tasks-prod.acc.corp.certik.com/96ab72a078f5441898ff3a62976103b0/diagrams/centralization_MultiOwnable-MultiOwnable-_owners.svg) In the contract `TreasuryOwnable`, the role `_treasury` has authority over the following functions: - function transferTreasury(): transfer the ownership of the role `_treasury` to another address. In the contract `ATokensAndRatesHelper` the role `_owner` has authority over the functions shown in the diagram below. ![](https://accelerator-tasks-prod.acc.corp.certik.com/96ab72a078f5441898ff3a62976103b0/diagrams/centralization_ATokensAndRatesHelper-ATokensAndRatesHelper-_owner.svg) In the contract `StableAndVariableTokensHelper` the role `_owner` has authority over the functions shown in the diagram below. ![](https://accelerator-tasks-prod.acc.corp.certik.com/96ab72a078f5441898ff3a62976103b0/diagrams/centralization_StableAndVariableTokensHelper-StableAndVariableTokensHelper-_owner.svg) In the contract `WETHGateway` the role `_owner` has authority over the functions shown in the diagram below. ![](https://accelerator-tasks-prod.acc.corp.certik.com/96ab72a078f5441898ff3a62976103b0/diagrams/centralization_WETHGateway-WETHGateway-_owner.svg) In the contract `AaveOracle` the role `_owner` has authority over the functions shown in the diagram below. ![](https://accelerator-tasks-prod.acc.corp.certik.com/96ab72a078f5441898ff3a62976103b0/diagrams/centralization_AaveOracle-AaveOracle-_owner.svg) In the contract `LendingRateOracle` the role `_owner` has authority over the functions shown in the diagram below. ![](https://accelerator-tasks-prod.acc.corp.certik.com/96ab72a078f5441898ff3a62976103b0/diagrams/centralization_LendingRateOracle-LendingRateOracle-_owner.svg) In the contract `PhiatBackupPriceOracle` the role `_owners` has authority over the functions shown in the diagram below. ![](https://accelerator-tasks-prod.acc.corp.certik.com/96ab72a078f5441898ff3a62976103b0/diagrams/centralization_PhiatBackupPriceOracle-PhiatBackupPriceOracle-_owners.svg) In the contract `PlsUsdPriceOracle` the role `_owners` has authority over the functions shown in the diagram below. ![](https://accelerator-tasks-prod.acc.corp.certik.com/96ab72a078f5441898ff3a62976103b0/diagrams/centralization_PlsUsdPriceOracle-PlsUsdPriceOracle-_owners.svg) In the contract `LendingPoolAddressesProvider` the role `_owner` has authority over the functions shown in the diagram below. ![](https://accelerator-tasks-prod.acc.corp.certik.com/96ab72a078f5441898ff3a62976103b0/diagrams/centralization_LendingPoolAddressesProvider-LendingPoolAddressesProvider-_owner.svg) In the contract `LendingPoolAddressesProviderRegistry` the role `_owner` has authority over the functions shown in the diagram below. ![](https://accelerator-tasks-prod.acc.corp.certik.com/96ab72a078f5441898ff3a62976103b0/diagrams/centralization_LendingPoolAddressesProviderRegistry-LendingPoolAddressesProviderRegistry-_owner.svg) In the contract `PhiatMultisigGov`, the role `owners` has authority over the following functions: - function updateReserveLimits(): update the reserve limits. - function updateReservesLimits(): update the reserve limits. In the contract `PhiatTimelockController` the role `admin` has authority over the functions shown in the diagram below. ![](https://accelerator-tasks-prod.acc.corp.certik.com/96ab72a078f5441898ff3a62976103b0/diagrams/centralization_PhiatTimelockController-PhiatTimelockController-admin.svg) In the contract `LendingPool`, the role `LENDING_POOL_CONFIGURATOR` has authority over the following functions: - function initReserve(): initializes a reserve. - function setReserveInterestRateStrategyAddress(): update the address of the interest rate strategy contract. - function setConfiguration(): update the reserve configuration data. - function setLimits(): update the limits of the reserve. - function setPause(): update the `_pause` state of a reserve. In the contract `LendingPoolConfigurator`, the role `POOL_ADMIN` has authority over the following functions: - function batchInitReserve(): initializes a reserve in batch. - function updateAToken(): update the aToken implementation for the reserve. - function updateStableDebtToken(): update the stable debt token implementation for the reserve. - function updateVariableDebtToken(): update the variable debt token implementation for the asset. - function enableBorrowingOnReserve()/disableBorrowingOnReserve(): enables/disables borrowing on a reserve. - function configureReserveAsCollateral(): update the reserve configurations. - function enableReserveStableRate()/disableReserveStableRate(): enables/disables stable rate borrowing on a reserve. - function activateReserve()/deactivateReserve(): activates/deactivates a reserve. - function freezeReserve()/unfreezeReserve(): freezes/unfreezes a reserve. - function setReserveFactor(): update the rese

HighUnimplemented FunctionsOpen

The contract `PlsUsdPriceOracle` is not marked as `abstract`. It also implements the interface `IChainlinkAggregator` but does not implement any functions in it. Thus, the compilation of this contract will fail. Also, the `latestAnswer` is updated by the contract owner instead of directly from chainlink sources like the contract `AaveOracle`(`IChainlinkAggregator(source).latestAnswer()`). Thus, the price source is unknown and can have centralization issues.

MediumUsage Of `Multisig` ContractOpen

Usually, to use the multi-signature wallet, the owner role of the applied contracts will be transferred to the multi-signature wallet. In the current protocol, some contracts followed the normal multi-signature usage. However, the linked contracts inherited the contract `Multisig` and used the function modifier `ownerExists`. This is not a proper multi-signature usage and allows a hacker to cause damage when the private key of an owner account has been lost. Also, the different inherited contracts will create multi-signature wallets in the protocol. The wallets may have different signer addresses and cause confusing role management. In addition, the contract `MultiOwnable` behave similarly to the function modifier `ownerExists` and does not mitigate the centralization issue.

LowIncompatibility with Deflationary TokensOpen

When transferring standard ERC20 deflationary tokens, the input amount may not be equal to the received amount due to the charged transaction fee. As a result, an inconsistency in the amount will occur and the transaction may fail due to the validation checks.

LowMissing Zero Address ValidationOpen

Addresses should be checked before assignment or external call to make sure they are not zero addresses. --- ```solidity=38 pool = _pool; ``` - `_pool` is not zero-checked before being used. --- ```solidity=39 addressesProvider = _addressesProvider; ``` - `_addressesProvider` is not zero-checked before being used. --- ```solidity=40 poolConfigurator = _poolConfigurator; ``` - `_poolConfigurator` is not zero-checked before being used. --- ```solidity=16 pool = _pool; ``` - `_pool` is not zero-checked before being used. --- ```solidity=17 addressesProvider = _addressesProvider; ``` - `_addressesProvider` is not zero-checked before being used. --- ```solidity=27 wPLS = _wPLS; ``` - `_wPLS` is not zero-checked before being used. --- ```solidity=49 BASE_CURRENCY = baseCurrency; ``` - `baseCurrency` is not zero-checked before being used. --- ```solidity=546 (bool success, bytes memory result) = collateralManager.delegatecall( abi.encodeWithSignature( "liquidationCall(address,address,address,uint256,bool)", collateralAsset, debtAsset, user, debtToCover, receiveAToken ) ); ``` - `collateralAsset` is not zero-checked before being used. --- ```solidity=20 ADMIN = admin; ``` - `admin` is not zero-checked before being used. --- ```solidity=18 phiatFeeDistribution = _phiatFeeDistribution; ``` - `_phiatFeeDistribution` is not zero-checked before being used. --- ```solidity=47 phiatFeeDistribution = _phiatFeeDistribution; ``` - `_phiatFeeDistribution` is not zero-checked before being used. --- ```solidity=100 _treasury = treasury; ``` - `treasury` is not zero-checked before being used. --- ```solidity=101 _underlyingAsset = underlyingAsset; ``` - `underlyingAsset` is not zero-checked before being used. --- ```solidity=100 _treasury = treasury; ``` - `treasury` is not zero-checked before being used. --- ```solidity=101 _underlyingAsset = underlyingAsset; ``` - `underlyingAsset` is not zero-checked before being used. --- ```solidity=51 _underlyingAsset = underlyingAsset; ``` - `underlyingAsset` is not zero-checked before being used. --- ```solidity=45 _underlyingAsset = underlyingAsset; ``` - `underlyingAsset` is not zero-checked before being used.

LowUnused Return ValueOpen

The return value of an external call is not stored in a local or state variable. ```solidity=31 WETH.approve(lendingPool, uint256(-1)); ``` --- ```solidity=79 ILendingPool(lendingPool).withdraw( address(WETH), amountToWithdraw, address(this) ); ``` --- ```solidity=120 ILendingPool(lendingPool).repay( address(WETH), msg.value, rateMode, onBehalfOf ); ``` --- ```solidity=95 _rewardToken.mintTo(user, rewards); ``` --- ```solidity=417 IVariableDebtToken(reserve.variableDebtTokenAddress).mint( msg.sender, msg.sender, stableDebt, reserve.variableBorrowIndex ); ``` --- ```solidity=429 IStableDebtToken(reserve.stableDebtTokenAddress).mint( msg.sender, msg.sender, variableDebt, reserve.currentStableBorrowRate ); ``` --- ```solidity=475 IStableDebtToken(address(stableDebtToken)).mint( user, user, stableDebt, reserve.currentStableBorrowRate ); ``` --- ```solidity=608 IAToken(aTokenAddresses[vars.i]).transferUnderlyingTo( receiverAddress, amounts[vars.i] ); ``` --- ```solidity=1076 IAToken(vars.aTokenAddress).transferUnderlyingTo( vars.user, vars.amount ); ``` --- ```solidity=25 phiat.claim(); ``` --- ```solidity=36 phiat.claimByTreasury(account); ```

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 (91)

  • phiat-protocol-main/contracts/protocol/libraries/configuration/UserConfiguration.sol
  • phiat-protocol-main/contracts/protocol/configuration/LendingPoolAddressesProvider.sol
  • phiat-protocol-main/contracts/interfaces/IChainlinkAggregator.sol
  • phiat-protocol-main/contracts/misc/UiPoolLimitDataProvider.sol
  • phiat-protocol-main/contracts/oracle/PhiatMarketLiquidityOracle.sol
  • phiat-protocol-main/contracts/misc/UiStakeDataProvider.sol
  • phiat-protocol-main/contracts/interfaces/ILendingPool.sol
  • phiat-protocol-main/contracts/protocol/tokenization/VariableDebtToken.sol
  • phiat-protocol-main/contracts/oracle/AaveOracle.sol
  • phiat-protocol-main/contracts/protocol/libraries/logic/ValidationLogic.sol
  • phiat-protocol-main/contracts/interfaces/IInitializableAToken.sol
  • phiat-protocol-main/contracts/protocol/staking/PhiatToken.sol
  • phiat-protocol-main/contracts/interfaces/IStableDebtToken.sol
  • phiat-protocol-main/contracts/interfaces/IPhiatMultisigTreasury.sol
  • phiat-protocol-main/contracts/interfaces/IPhiatFeeDistribution.sol
  • phiat-protocol-main/contracts/protocol/lendingpool/LendingPool.sol
  • phiat-protocol-main/contracts/protocol/lendingpool/LendingPoolCollateralManager.sol
  • phiat-protocol-main/contracts/protocol/libraries/math/MathUtils.sol
  • phiat-protocol-main/contracts/oracle/LendingRateOracle.sol
  • phiat-protocol-main/contracts/protocol/lendingpool/LendingPoolStorage.sol
  • phiat-protocol-main/contracts/misc/interfaces/IAaveProtocolDataProvider.sol
  • phiat-protocol-main/contracts/misc/interfaces/IAaveOracle.sol
  • phiat-protocol-main/contracts/misc/interfaces/IUiPoolDataProviderV2.sol
  • phiat-protocol-main/contracts/interfaces/IAToken.sol
  • phiat-protocol-main/contracts/deployments/ATokensAndRatesHelper.sol
  • phiat-protocol-main/contracts/protocol/tokenization/ATokenV2.sol
  • phiat-protocol-main/contracts/interfaces/ICreditDelegationToken.sol
  • phiat-protocol-main/contracts/interfaces/ILendingPoolCollateralManager.sol
  • phiat-protocol-main/contracts/misc/interfaces/IUiIncentiveDataProviderV2.sol
  • phiat-protocol-main/contracts/interfaces/ILendingPoolConfigurator.sol
  • phiat-protocol-main/contracts/protocol/tokenization/AToken.sol
  • phiat-protocol-main/contracts/misc/interfaces/IERC20MetadataBytes.sol
  • phiat-protocol-main/contracts/flashloan/base/FlashLoanReceiverBase.sol
  • phiat-protocol-main/contracts/interfaces/IPhiatBackupPriceOracle.sol
  • phiat-protocol-main/contracts/protocol/lendingpool/DefaultReserveInterestRateStrategy.sol
  • phiat-protocol-main/contracts/protocol/tokenization/StableDebtToken.sol
  • phiat-protocol-main/contracts/interfaces/IScaledBalanceToken.sol
  • phiat-protocol-main/contracts/interfaces/IPhiatTimelockController.sol
  • phiat-protocol-main/contracts/protocol/tokenization/base/DebtTokenBase.sol
  • phiat-protocol-main/contracts/protocol/libraries/helpers/Helpers.sol
  • phiat-protocol-main/contracts/interfaces/IVariableDebtToken.sol
  • phiat-protocol-main/contracts/misc/interfaces/IWETHGateway.sol
  • phiat-protocol-main/contracts/interfaces/ILendingPoolAddressesProvider.sol
  • phiat-protocol-main/contracts/oracle/PlsUsdPriceOracle.sol
  • phiat-protocol-main/contracts/protocol/governance/PhiatMultisigGov.sol
  • phiat-protocol-main/contracts/protocol/staking/ERC20Recoverable.sol
  • phiat-protocol-main/contracts/dependencies/pulsex/IPulseXFactory.sol
  • phiat-protocol-main/contracts/protocol/libraries/helpers/Errors.sol
  • phiat-protocol-main/contracts/interfaces/IPlsUsdPriceOracleSetter.sol
  • phiat-protocol-main/contracts/flashloan/interfaces/IFlashLoanReceiver.sol
  • phiat-protocol-main/contracts/interfaces/ILendingRateOracle.sol
  • phiat-protocol-main/contracts/misc/interfaces/IUiPoolLimitDataProvider.sol
  • phiat-protocol-main/contracts/protocol/libraries/logic/ReserveLogic.sol
  • phiat-protocol-main/contracts/misc/AaveProtocolDataProvider.sol
  • phiat-protocol-main/contracts/interfaces/IDelegationToken.sol
  • phiat-protocol-main/contracts/interfaces/IInitializableDebtToken.sol
  • phiat-protocol-main/contracts/misc/UiIncentiveDataProviderV2.sol
  • phiat-protocol-main/contracts/protocol/libraries/aave-upgradeability/VersionedInitializable.sol
  • phiat-protocol-main/contracts/interfaces/IReserveInterestRateStrategy.sol
  • phiat-protocol-main/contracts/misc/UiPoolDataProviderV2.sol
  • phiat-protocol-main/contracts/protocol/libraries/aave-upgradeability/InitializableImmutableAdminUpgradeabilityProxy.sol
  • phiat-protocol-main/contracts/misc/interfaces/IWETH.sol
  • phiat-protocol-main/contracts/interfaces/IMarketLiquidityOracle.sol
  • phiat-protocol-main/contracts/misc/interfaces/IUiStakeDataProvider.sol
  • phiat-protocol-main/contracts/interfaces/IPhiatIncentivesController.sol
  • phiat-protocol-main/contracts/protocol/libraries/configuration/ReserveConfiguration.sol
  • phiat-protocol-main/contracts/misc/WalletBalanceProvider.sol
  • phiat-protocol-main/contracts/protocol/configuration/LendingPoolAddressesProviderRegistry.sol
  • phiat-protocol-main/contracts/protocol/governance/PhiatTimelockController.sol
  • phiat-protocol-main/contracts/protocol/tokenization/DelegationAwareAToken.sol
  • phiat-protocol-main/contracts/dependencies/governance/TreasuryOwnable.sol
  • phiat-protocol-main/contracts/dependencies/governance/Multisig.sol
  • phiat-protocol-main/contracts/oracle/PhiatBackupPriceOracle.sol
  • phiat-protocol-main/contracts/protocol/libraries/logic/GenericLogic.sol
  • phiat-protocol-main/contracts/protocol/libraries/math/PercentageMath.sol
  • phiat-protocol-main/contracts/protocol/staking/PhiatFeeDistribution.sol
  • phiat-protocol-main/contracts/dependencies/pulsex/IPulseXPair.sol
  • phiat-protocol-main/contracts/misc/WETHGateway.sol
  • phiat-protocol-main/contracts/interfaces/IPriceOracleGetter.sol
  • phiat-protocol-main/contracts/interfaces/ILendingPoolAddressesProviderRegistry.sol
  • phiat-protocol-main/contracts/dependencies/pulsex/IPulseXRouter03.sol
  • phiat-protocol-main/contracts/interfaces/IPhiatMultisigGov.sol
  • phiat-protocol-main/contracts/dependencies/governance/MultiOwnable.sol
  • phiat-protocol-main/contracts/interfaces/IExchangeAdapter.sol
  • phiat-protocol-main/contracts/deployments/StableAndVariableTokensHelper.sol
  • phiat-protocol-main/contracts/protocol/staking/PhiatMultisigTreasury.sol
  • phiat-protocol-main/contracts/protocol/libraries/types/DataTypes.sol
  • phiat-protocol-main/contracts/protocol/libraries/aave-upgradeability/BaseImmutableAdminUpgradeabilityProxy.sol
  • phiat-protocol-main/contracts/protocol/libraries/math/WadRayMath.sol
  • phiat-protocol-main/contracts/protocol/tokenization/IncentivizedERC20.sol
  • phiat-protocol-main/contracts/protocol/lendingpool/LendingPoolConfigurator.sol

Part of Phiat’s security record

Phiat
Audits1 audit by 1 firmLast audit Apr 2023, by CertiK.
Critical findingsNo open critical findingsIn 1 report.
Open Phiat’s security record

Security firm

CertiK

1,045 projects reviewed · 1,376 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