Skip to content

EulerETokenMock deposit() bug #7

@daejunpark

Description

@daejunpark

convertToShares(amount) should be executed before the token transfer; otherwise, it mints less shares than it should (except the very first deposit).

function deposit(uint256, uint256 amount) external override {
// call EulerMock to transfer tokens from sender
euler.transferTokenFrom(underlying, msg.sender, address(this), amount);
// mint shares
_mint(msg.sender, convertToShares(amount));
}

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