Planet is a decentralized financial protocol consisting of different planets, each their own application, designed to enable anyone to freely activate their capital. Planet enables access to open, decentralized financial services.
gTokens are interest-bearing tokens that function as your receipt to be able to withdraw your deposited positions. So if you were to deposit 100 UST, you'd receive gUST. Over time, the value of your gToken should continue to rise as its value comes from the ratio between outstanding gTokens vs. the total amount of UST in the contract.
GErc20Delegator.delegateTo(address,bytes) (#1595-1603) uses delegatecall to a input-controlled function id
- (success,returnData) = callee.delegatecall(data) (#1596)
GErc20Delegator.fallback() (#1636-1650) uses delegatecall to a input-controlled function id
- (success) = implementation.delegatecall(msg.data) (#1640)
Avoid using delegatecall. Use only trusted destinations.
Additional information: link
EIP20NonStandardInterface (#728-790) has incorrect ERC20 function interface:EIP20NonStandardInterface.transfer(address,uint256) (#754)
EIP20NonStandardInterface (#728-790) has incorrect ERC20 function interface:EIP20NonStandardInterface.transferFrom(address,address,uint256) (#768)
Set the appropriate return values and types for the defined ERC20 functions.
Additional information: link
Unable to verify that contract auditor is trusted: Certik, Quantstamp, Hacken, Solidity, Paladinsec, Openzeppelin, Verichains
ExponentialNoError.mantissaOne (#13) is never used in PlanetDiscount (#601-718)
GTokenStorage._notEntered (#836) is never used in GErc20Delegator (#1159-1652)
GTokenStorage.borrowRateMaxMantissa (#857) is never used in GErc20Delegator (#1159-1652)
GTokenStorage.reserveFactorMaxMantissa (#862) is never used in GErc20Delegator (#1159-1652)
GTokenStorage.initialExchangeRateMantissa (#892) is never used in GErc20Delegator (#1159-1652)
GTokenStorage.accountTokens (#927) is never used in GErc20Delegator (#1159-1652)
GTokenStorage.transferAllowances (#932) is never used in GErc20Delegator (#1159-1652)
GTokenStorage.accountBorrows (#937) is never used in GErc20Delegator (#1159-1652)
Remove unused state variables.
Additional information: link
Reentrancy in GErc20Delegator._setImplementation(address,bool,bytes) (#1209-1222):
External calls:
- delegateToImplementation(abi.encodeWithSignature(_resignImplementation())) (#1213)
- (success,returnData) = callee.delegatecall(data) (#1596)
State variables written after the call(s):
- implementation = implementation_ (#1217)
Reentrancy in GErc20Delegator.constructor(address,GammatrollerInterface,InterestRateModel,uint256,string,string,uint8,address,address,bytes) (#1173-1201):
External calls:
- delegateTo(implementation_,abi.encodeWithSignature(initialize(address,address,address,uint256,string,string,uint8),underlying_,gammatroller_,interestRateModel_,initialExchangeRateMantissa_,name_,symbol_,decimals_)) (#1187-1194)
- (success,returnData) = callee.delegatecall(data) (#1596)
- _setImplementation(implementation_,false,becomeImplementationData) (#1197)
- (success,returnData) = callee.delegatecall(data) (#1596)
State variables written after the call(s):
- admin = admin_ (#1200)
Apply the check-effects-interactions pattern.
Additional information: link
PlanetDiscount.returnBorrowerStakedAsset(address,address).vars (#655) is a local variable never initialized
Initialize all the variables. If a variable is meant to be initialized to zero, explicitly set it to zero to improve code readability.
Additional information: link
Exponential.divScalarByExpTruncate(uint256,ExponentialNoError.Exp).fraction (#384) shadows:
- ExponentialNoError.fraction(uint256,uint256) (#191-193) (function)
Rename the local variables that shadow another component.
Additional information: link
PlanetDiscount.changeAddress(address,address,address)._newgGammaAddress (#631) lacks a zero-check on :
- gGammaAddress = _newgGammaAddress (#636)
PlanetDiscount.changeAddress(address,address,address)._newGammatroller (#631) lacks a zero-check on :
- gammatroller = _newGammatroller (#637)
PlanetDiscount.changeAddress(address,address,address)._newOracle (#631) lacks a zero-check on :
- oracle = _newOracle (#638)
GErc20Delegator.constructor(address,GammatrollerInterface,InterestRateModel,uint256,string,string,uint8,address,address,bytes).admin_ (#1180) lacks a zero-check on :
- admin = admin_ (#1200)
GErc20Delegator._setImplementation(address,bool,bytes).implementation_ (#1209) lacks a zero-check on :
- implementation = implementation_ (#1217)
Check that the address is not zero.
Additional information: link
PlanetDiscount.returnBorrowerStakedAsset(address,address) (#652-670) has external calls inside a loop: (gTokenBalance,exchangeRate) = MarketToken(marketAddress).getAccountSnapshot(borrower) (#657)
PlanetDiscount.returnBorrowerStakedAsset(address,address) (#652-670) has external calls inside a loop: price = PriceOracle(oracle).getUnderlyingPrice(MarketToken(marketAddress)) (#660)
Favor pull over push strategy for external calls.
Additional information: link
Reentrancy in GErc20Delegator._setImplementation(address,bool,bytes) (#1209-1222):
External calls:
- delegateToImplementation(abi.encodeWithSignature(_resignImplementation())) (#1213)
- (success,returnData) = callee.delegatecall(data) (#1596)
- delegateToImplementation(abi.encodeWithSignature(_becomeImplementation(bytes),becomeImplementationData)) (#1219)
- (success,returnData) = callee.delegatecall(data) (#1596)
Event emitted after the call(s):
- NewImplementation(oldImplementation,implementation) (#1221)
Reentrancy in GErc20Delegator.constructor(address,GammatrollerInterface,InterestRateModel,uint256,string,string,uint8,address,address,bytes) (#1173-1201):
External calls:
- delegateTo(implementation_,abi.encodeWithSignature(initialize(address,address,address,uint256,string,string,uint8),underlying_,gammatroller_,interestRateModel_,initialExchangeRateMantissa_,name_,symbol_,decimals_)) (#1187-1194)
- (success,returnData) = callee.delegatecall(data) (#1596)
- _setImplementation(implementation_,false,becomeImplementationData) (#1197)
- (success,returnData) = callee.delegatecall(data) (#1596)
Event emitted after the call(s):
- NewImplementation(oldImplementation,implementation) (#1221)
- _setImplementation(implementation_,false,becomeImplementationData) (#1197)
Apply the check-effects-interactions pattern.
Additional information: link
GErc20Delegator.delegateTo(address,bytes) (#1595-1603) uses assembly
- INLINE ASM (#1597-1601)
GErc20Delegator.delegateToViewImplementation(bytes) (#1622-1630) uses assembly
- INLINE ASM (#1624-1628)
GErc20Delegator.fallback() (#1636-1650) uses assembly
- INLINE ASM (#1642-1649)
Do not use evm assembly.
Additional information: link
CarefulMath.addThenSubUInt(uint256,uint256,uint256) (#263-271) is never used and should be removed
CarefulMath.subUInt(uint256,uint256) (#239-245) is never used and should be removed
Context._msgData() (#543-546) is never used and should be removed
Exponential.addExp(ExponentialNoError.Exp,ExponentialNoError.Exp) (#297-301) is never used and should be removed
Exponential.divExp(ExponentialNoError.Exp,ExponentialNoError.Exp) (#440-442) is never used and should be removed
Exponential.divScalar(ExponentialNoError.Exp,uint256) (#351-358) is never used and should be removed
Exponential.divScalarByExp(uint256,ExponentialNoError.Exp) (#363-378) is never used and should be removed
Exponential.divScalarByExpTruncate(uint256,ExponentialNoError.Exp) (#383-390) is never used and should be removed
Exponential.mulExp(ExponentialNoError.Exp,ExponentialNoError.Exp) (#395-415) is never used and should be removed
Exponential.mulExp(uint256,uint256) (#420-422) is never used and should be removed
Exponential.mulExp3(ExponentialNoError.Exp,ExponentialNoError.Exp,ExponentialNoError.Exp) (#427-433) is never used and should be removed
Exponential.mulScalarTruncateAddUInt(ExponentialNoError.Exp,uint256,uint256) (#339-346) is never used and should be removed
Exponential.subExp(ExponentialNoError.Exp,ExponentialNoError.Exp) (#306-310) is never used and should be removed
ExponentialNoError.add_(ExponentialNoError.Double,ExponentialNoError.Double) (#90-92) is never used and should be removed
ExponentialNoError.add_(ExponentialNoError.Exp,ExponentialNoError.Exp) (#86-88) is never used and should be removed
ExponentialNoError.add_(uint256,uint256) (#94-96) is never used and should be removed
ExponentialNoError.add_(uint256,uint256,string) (#98-102) is never used and should be removed
ExponentialNoError.div_(ExponentialNoError.Double,ExponentialNoError.Double) (#170-172) is never used and should be removed
ExponentialNoError.div_(ExponentialNoError.Double,uint256) (#174-176) is never used and should be removed
ExponentialNoError.div_(ExponentialNoError.Exp,ExponentialNoError.Exp) (#158-160) is never used and should be removed
ExponentialNoError.div_(ExponentialNoError.Exp,uint256) (#162-164) is never used and should be removed
ExponentialNoError.div_(uint256,ExponentialNoError.Double) (#178-180) is never used and should be removed
ExponentialNoError.div_(uint256,ExponentialNoError.Exp) (#166-168) is never used and should be removed
ExponentialNoError.div_(uint256,uint256) (#182-184) is never used and should be removed
ExponentialNoError.div_(uint256,uint256,string) (#186-189) is never used and should be removed
ExponentialNoError.fraction(uint256,uint256) (#191-193) is never used and should be removed
ExponentialNoError.greaterThanExp(ExponentialNoError.Exp,ExponentialNoError.Exp) (#65-67) is never used and should be removed
ExponentialNoError.isZeroExp(ExponentialNoError.Exp) (#72-74) is never used and should be removed
ExponentialNoError.lessThanExp(ExponentialNoError.Exp,ExponentialNoError.Exp) (#51-53) is never used and should be removed
ExponentialNoError.lessThanOrEqualExp(ExponentialNoError.Exp,ExponentialNoError.Exp) (#58-60) is never used and should be removed
ExponentialNoError.mul_(ExponentialNoError.Double,ExponentialNoError.Double) (#133-135) is never used and should be removed
ExponentialNoError.mul_(ExponentialNoError.Double,uint256) (#137-139) is never used and should be removed
ExponentialNoError.mul_(ExponentialNoError.Exp,ExponentialNoError.Exp) (#121-123) is never used and should be removed
ExponentialNoError.mul_(ExponentialNoError.Exp,uint256) (#125-127) is never used and should be removed
ExponentialNoError.mul_(uint256,ExponentialNoError.Double) (#141-143) is never used and should be removed
ExponentialNoError.mul_(uint256,ExponentialNoError.Exp) (#129-131) is never used and should be removed
ExponentialNoError.mul_(uint256,uint256) (#145-147) is never used and should be removed
ExponentialNoError.mul_(uint256,uint256,string) (#149-156) is never used and should be removed
ExponentialNoError.mul_ScalarTruncate(ExponentialNoError.Exp,uint256) (#35-38) is never used and should be removed
ExponentialNoError.mul_ScalarTruncateAddUInt(ExponentialNoError.Exp,uint256,uint256) (#43-46) is never used and should be removed
ExponentialNoError.safe224(uint256,string) (#76-79) is never used and should be removed
ExponentialNoError.safe32(uint256,string) (#81-84) is never used and should be removed
ExponentialNoError.sub_(ExponentialNoError.Double,ExponentialNoError.Double) (#108-110) is never used and should be removed
ExponentialNoError.sub_(ExponentialNoError.Exp,ExponentialNoError.Exp) (#104-106) is never used and should be removed
ExponentialNoError.sub_(uint256,uint256) (#112-114) is never used and should be removed
ExponentialNoError.sub_(uint256,uint256,string) (#116-119) is never used and should be removed
Remove unused functions.
Additional information: link
Low level call in GErc20Delegator.delegateTo(address,bytes) (#1595-1603):
- (success,returnData) = callee.delegatecall(data) (#1596)
Low level call in GErc20Delegator.delegateToViewImplementation(bytes) (#1622-1630):
- (success,returnData) = address(this).staticcall(abi.encodeWithSignature(delegateToImplementation(bytes),data)) (#1623)
Low level call in GErc20Delegator.fallback() (#1636-1650):
- (success) = implementation.delegatecall(msg.data) (#1640)
Avoid low-level calls. Check the call success. If the call is meant for a contract, check for code existence
Additional information: link
Function ExponentialNoError.mul_ScalarTruncate(ExponentialNoError.Exp,uint256) (#35-38) is not in mixedCase
Function ExponentialNoError.mul_ScalarTruncateAddUInt(ExponentialNoError.Exp,uint256,uint256) (#43-46) is not in mixedCase
Constant ExponentialNoError.expScale (#10) is not in UPPER_CASE_WITH_UNDERSCORES
Constant ExponentialNoError.doubleScale (#11) is not in UPPER_CASE_WITH_UNDERSCORES
Constant ExponentialNoError.halfExpScale (#12) is not in UPPER_CASE_WITH_UNDERSCORES
Constant ExponentialNoError.mantissaOne (#13) is not in UPPER_CASE_WITH_UNDERSCORES
Constant PriceOracle.isPriceOracle (#453) is not in UPPER_CASE_WITH_UNDERSCORES
Constant GammatrollerInterface.isGammatroller (#467) is not in UPPER_CASE_WITH_UNDERSCORES
Event PlanetDiscountgGammaAddressChange(address,address) (#625) is not in CapWords
Event PlanetDiscountgammatrollerChange(address,address) (#627) is not in CapWords
Event PlanetDiscountoracleChanged(address,address) (#629) is not in CapWords
Parameter PlanetDiscount.changeAddress(address,address,address)._newgGammaAddress (#631) is not in mixedCase
Parameter PlanetDiscount.changeAddress(address,address,address)._newGammatroller (#631) is not in mixedCase
Parameter PlanetDiscount.changeAddress(address,address,address)._newOracle (#631) is not in mixedCase
Constant InterestRateModel.isInterestRateModel (#802) is not in UPPER_CASE_WITH_UNDERSCORES
Variable GTokenStorage._notEntered (#836) is not in mixedCase
Constant GTokenStorage.borrowRateMaxMantissa (#857) is not in UPPER_CASE_WITH_UNDERSCORES
Constant GTokenStorage.reserveFactorMaxMantissa (#862) is not in UPPER_CASE_WITH_UNDERSCORES
Constant GTokenStorage.protocolSeizeShareMantissa (#952) is not in UPPER_CASE_WITH_UNDERSCORES
Function GTokenInterface._setPendingAdmin(address) (#1077) is not in mixedCase
Function GTokenInterface._acceptAdmin() (#1078) is not in mixedCase
Function GTokenInterface._setGammatroller(GammatrollerInterface) (#1079) is not in mixedCase
Function GTokenInterface._setReserveFactor(uint256) (#1080) is not in mixedCase
Function GTokenInterface._reduceReserves(uint256) (#1081) is not in mixedCase
Function GTokenInterface._setInterestRateModel(InterestRateModel) (#1082) is not in mixedCase
Constant GTokenInterface.isGToken (#960) is not in UPPER_CASE_WITH_UNDERSCORES
Function GErc20Interface._addReserves(uint256) (#1109) is not in mixedCase
Function CDelegatorInterface._setImplementation(address,bool,bytes) (#1131) is not in mixedCase
Function CDelegateInterface._becomeImplementation(bytes) (#1140) is not in mixedCase
Function CDelegateInterface._resignImplementation() (#1145) is not in mixedCase
Function GErc20Delegator._setImplementation(address,bool,bytes) (#1209-1222) is not in mixedCase
Function GErc20Delegator._setDiscountLevel(address) (#1470-1473) is not in mixedCase
Function GErc20Delegator._setPendingAdmin(address) (#1522-1525) is not in mixedCase
Function GErc20Delegator._setGammatroller(GammatrollerInterface) (#1532-1535) is not in mixedCase
Function GErc20Delegator._setReserveFactor(uint256) (#1542-1545) is not in mixedCase
Function GErc20Delegator._acceptAdmin() (#1552-1555) is not in mixedCase
Function GErc20Delegator._addReserves(uint256) (#1562-1565) is not in mixedCase
Function GErc20Delegator._reduceReserves(uint256) (#1572-1575) is not in mixedCase
Function GErc20Delegator._setInterestRateModel(InterestRateModel) (#1583-1586) is not in mixedCase
Follow the Solidity naming convention.
Additional information: link
Redundant expression "this (#544)" inContext (#538-547)
Remove redundant statements if they congest code but offer no value.
Additional information: link
Variable PlanetDiscount.level0Discount (#608) is too similar to PlanetDiscount.level1Discount (#609)
Variable PlanetDiscount.level0Discount (#608) is too similar to PlanetDiscount.level2Discount (#610)
Variable PlanetDiscount.level1Discount (#609) is too similar to PlanetDiscount.level2Discount (#610)
Variable PlanetDiscount.level2Discount (#610) is too similar to PlanetDiscount.level3Discount (#611)
Variable PlanetDiscount.level0Discount (#608) is too similar to PlanetDiscount.level3Discount (#611)
Variable PlanetDiscount.level1Discount (#609) is too similar to PlanetDiscount.level3Discount (#611)
Prevent variables from having similar names.
Additional information: link
GErc20Storage.underlying (#1090) should be constant
GTokenStorage._notEntered (#836) should be constant
GTokenStorage.accrualBlockNumber (#902) should be constant
GTokenStorage.borrowIndex (#907) should be constant
GTokenStorage.decimals (#851) should be constant
GTokenStorage.initialExchangeRateMantissa (#892) should be constant
GTokenStorage.name (#841) should be constant
GTokenStorage.pendingAdmin (#872) should be constant
GTokenStorage.reserveFactorMantissa (#897) should be constant
GTokenStorage.symbol (#846) should be constant
GTokenStorage.totalBorrows (#912) should be constant
GTokenStorage.totalReserves (#917) should be constant
GTokenStorage.totalSupply (#922) should be constant
PlanetDiscount.level0Discount (#608) should be constant
PlanetDiscount.level1Discount (#609) should be constant
PlanetDiscount.level1Min (#613) should be constant
PlanetDiscount.level2Discount (#610) should be constant
PlanetDiscount.level2Min (#614) should be constant
PlanetDiscount.level3Discount (#611) should be constant
PlanetDiscount.level3Min (#615) should be constant
Add the constant attributes to state variables that never change.
Additional information: link
renounceOwnership() should be declared external:
- Ownable.renounceOwnership() (#585-588)
transferOwnership(address) should be declared external:
- Ownable.transferOwnership(address) (#594-598)
changeAddress(address,address,address) should be declared external:
- PlanetDiscount.changeAddress(address,address,address) (#631-643)
deprecateMarket(address) should be declared external:
- PlanetDiscount.deprecateMarket(address) (#646-650)
borrowBalanceStored(address) should be declared external:
- GErc20Delegator.borrowBalanceStored(address) (#1422-1425)
- GTokenInterface.borrowBalanceStored(address) (#1067)
exchangeRateCurrent() should be declared external:
- GErc20Delegator.exchangeRateCurrent() (#1431-1434)
- GTokenInterface.exchangeRateCurrent() (#1068)
exchangeRateStored() should be declared external:
- GErc20Delegator.exchangeRateStored() (#1441-1444)
- GTokenInterface.exchangeRateStored() (#1069)
accrueInterest() should be declared external:
- GErc20Delegator.accrueInterest() (#1460-1463)
- GTokenInterface.accrueInterest() (#1071)
_setGammatroller(GammatrollerInterface) should be declared external:
- GErc20Delegator._setGammatroller(GammatrollerInterface) (#1532-1535)
- GTokenInterface._setGammatroller(GammatrollerInterface) (#1079)
_setInterestRateModel(InterestRateModel) should be declared external:
- GErc20Delegator._setInterestRateModel(InterestRateModel) (#1583-1586)
- GTokenInterface._setInterestRateModel(InterestRateModel) (#1082)
_becomeImplementation(bytes) should be declared external:
- CDelegateInterface._becomeImplementation(bytes) (#1140)
_resignImplementation() should be declared external:
- CDelegateInterface._resignImplementation() (#1145)
Use the external attribute for functions never called from the contract.
Additional information: link
BscScan page for the token does not contain additional info: website, socials, description, etc.
Additional information: link
Unable to verify that token and website are owned by the same team (no listings + unable to find contract on website)
Unable to verify token contract address on the website
Unable to find whitepaper link on the website
Unable to find token on CoinGecko
Additional information: link
Unable to find token on CoinMarketCap
Additional information: link
Token is not listed at Mobula.Finance
Additional information: link
Unable to find token on CoinHunt
Additional information: link
Young tokens have high risks of price dump / death
Young tokens have high risks of scam / price dump / death
Token has no active CoinGecko listing / rank
Token has no active CoinMarketCap listing / rank
Unable to find Youtube account
Unable to find Discord account