Skip to content

BorrowController.borrowAllowed using tx.origin #106

@barakman

Description

@barakman

The aforementioned function relies on tx.origin:

//If the message sender is not a contract, then there's no need check allowlist
if(msgSender == tx.origin) return true;

There used to be a general guideline to avoid relying on tx.origin under any circumstances.
You can read it here and here (by Vitalik himself).

There might be nothing to it in your specific case, so just FYI.
In particularly, since the purpose at hand (check "if the message sender is not a contract") can be achieved also in other ways.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions