code-423n4 / 2022-02-tribe-turbo-findings

1 stars 0 forks source link

Seems to be an inattention error #18

Closed code423n4 closed 2 years ago

code423n4 commented 2 years ago

Lines of code

https://github.com/Rari-Capital/solmate/blob/1205a9067ff957ef8b0b003ff9d77c20ef9f2e0b/src/mixins/ERC4626.sol#L67

Vulnerability details

Shouldn't it be _mint(to, shares); ?

Currently the using mint, one would receive as many shares as assets they transfer, which is not the intended behaviour

Joeysantoro commented 2 years ago

https://github.com/Rari-Capital/solmate/commit/fd67739ec00b8441605f6dcf04d83458884fa3d0 fixed

GalloDaSballo commented 2 years ago

Duplicate of #27