Some ERC20 tokens will not work with SafeTransferLib
#253
Labels
2 (Med Risk)
Assets not at direct risk, but function/availability of the protocol could be impacted or leak value
bug
Something isn't working
downgraded by judge
Judge downgraded the risk level of this issue
sponsor disputed
Sponsor cannot duplicate the issue, or otherwise disagrees this is an issue
unsatisfactory
does not satisfy C4 submission criteria; not eligible for awards
Lines of code
https://github.com/code-423n4/2023-11-panoptic/blob/f75d07c345fd795f907385868c39bafcd6a56624/contracts/libraries/SafeTransferLib.sol#L16
Vulnerability details
Impact
SafeTranferLib
doesn’t support tokens like FRAX, UNI, CRV, COMP on itssafeTransferFrom
function, which will result in unexpected behavior for the system.Proof of Concept
The
SafeTransferLib
used in this project is a simplified version of Solmate'sSafeTransferLib
. However, Solmate had to make some changes to address issues with the tokens mentioned above in thesafeTransferFrom
function. You can find more information about these issues in this GitHub issue: LinkThe fix for this problem can be found in this pull request: LinkAffected Code Example:
Tools Used
manual review
Recommended Mitigation Steps
Use the latest version of the solmate library https://github.com/transmissions11/solmate/blob/4b47a19038b798b4a33d9749d25e570443520647/src/utils/SafeTransferLib.sol#L45C11-L49C1
Assessed type
DoS
The text was updated successfully, but these errors were encountered: