Skip to content

EulerETokenMock deposit() bug #7

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));
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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