sechub
HomeServicesAssetsJobsFindingsTicketsGovCheck
Guest Mode. Click here to sign in and access all features

    Incompatibility With Deflationary/Rebasing Tokens

    AGAVE: Deployment Security Audit

    Severity
    Low
    Status
    Open
    Location(s)

    https://github.com/Agave-DAO/protocol-v2/blob/69cbb24fd849f3d0a93274bcda67fd5e2eda93f6/contracts/protocol/lendingpool/LendingPool.sol#L128

    Description

    Upon deposit of an asset to the LendingPool contract, there is the possibility that the amount received by the contract is not the same as the amount deposited, in most cases less. This would only happen with non-standard ERC20 tokens like deflationary or rebasing tokens. While currently the addition of new tokens is tightly governed and controlled by the Protocol SAFE, the mistake of not performing proper due diligence over new tokens, or including upgradable tokens could introduce a non-standard ERC20 token, allowing this bug to occur. This bug would introduce an accounting error in the protocol, between the number of actual deposits and the emitted aTokens.

    Recommendation

    We recommend checking the balance of the deposit token before and after the safeTransferFrom() to ensure correct accounting.

    Comments
    No comments yet

    Incompatibility With Deflationary/Rebasing Tokens

    AGAVE: Deployment Security Audit

    Severity
    Low
    Status
    Open