Skip to content

Identified and mitigated: CToken.sol vulnerability with ERC677/ERC777 tokens #14

@dacarva

Description

@dacarva

The current implementation of the protocol has a potential reentrancy vulnerability when a ERC677 or ERC777 token is listed as the underlying token of the CToken.

https://github.com/Tropykus/protocol/blob/c88d0baa0a91235cd61716f3140d07ee9ba7ad4e/contracts/CToken.sol#L1449-L1454

The deployed markets at the moment do not interact with such tokens and are not subject to the vulnerability. A proposal for future listings has been added in the following commit: 97ae23b

https://github.com/Tropykus/protocol/blob/97ae23b3ef15ddadd5f6dd9c6bedf7570beed998/contracts/CToken.sol#L1450-L1455

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions