Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgraded Q -> 2 from #543 [1727783721379] #552

Closed
c4-judge opened this issue Oct 1, 2024 · 2 comments
Closed

Upgraded Q -> 2 from #543 [1727783721379] #552

c4-judge opened this issue Oct 1, 2024 · 2 comments
Labels
2 (Med Risk) Assets not at direct risk, but function/availability of the protocol could be impacted or leak value duplicate-205 satisfactory satisfies C4 submission criteria; eligible for awards

Comments

@c4-judge
Copy link
Contributor

c4-judge commented Oct 1, 2024

Judge has assessed an item in Issue #543 as 2 risk. The relevant finding follows:

[L01] When users use _transferFrom() to transfer funds via ApprovalType.PERMIT approval type, the transaction may be reverted if malicious user frontrun the related permit.

function _transferFrom(
    address token,
    address from,
    address to,
    uint256 amount,
    PermitParams memory params
) internal {
    if (params.approvalType == ApprovalType.PERMIT2) {
        ...
    } else if (params.approvalType == ApprovalType.PERMIT) {
        // Consume a standard ERC20 permit message
        // @audit this will be blocked.
        IERC20Permit(token).safePermit(
            from,
            to,
            params.approvalAmount,
            params.deadline,
            params.v,
            params.r,
            params.s
        );
        IERC20(token).safeTransferFrom(from, to, amount);
    } else {
        ...
    }
}
@c4-judge c4-judge added the 2 (Med Risk) Assets not at direct risk, but function/availability of the protocol could be impacted or leak value label Oct 1, 2024
c4-judge added a commit that referenced this issue Oct 1, 2024
@c4-judge c4-judge closed this as completed Oct 1, 2024
@c4-judge
Copy link
Contributor Author

c4-judge commented Oct 1, 2024

koolexcrypto marked the issue as duplicate of #205

@c4-judge c4-judge added the satisfactory satisfies C4 submission criteria; eligible for awards label Oct 1, 2024
@c4-judge
Copy link
Contributor Author

c4-judge commented Oct 1, 2024

koolexcrypto marked the issue as satisfactory

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2 (Med Risk) Assets not at direct risk, but function/availability of the protocol could be impacted or leak value duplicate-205 satisfactory satisfies C4 submission criteria; eligible for awards
Projects
None yet
Development

No branches or pull requests

1 participant