Platform: Code4rena
Start Date: 05/01/2023
Pot Size: $90,500 USDC
Total HM: 55
Participants: 103
Period: 14 days
Judge: Picodes
Total Solo HM: 18
Id: 202
League: ETH
Rank: 92/103
Findings: 1
Award: $44.14
🌟 Selected for report: 0
🚀 Solo Findings: 0
🌟 Selected for report: 0xsomeone
Also found by: ayeslick, tsvetanovv
44.1378 USDC - $44.14
https://github.com/code-423n4/2023-01-astaria/blob/main/src/ClearingHouse.sol#L148
Some tokens (like USDT) do not work when changing the allowance from an existing non-zero allowance value. They must first be approved by zero and then the actual allowance must be approved.
ClearingHouse.sol 148: ERC20(paymentToken).safeApprove( 149: address(ASTARIA_ROUTER.TRANSFER_PROXY()), 150: payment - liquidatorPayment 151: );
Manual Review
Use approve(0) to set the allowance to zero immediately before existing approve() calls.
#0 - c4-judge
2023-01-22T15:26:43Z
Picodes marked the issue as duplicate of #437
#1 - c4-judge
2023-02-24T10:19:59Z
Picodes marked the issue as satisfactory
#2 - c4-judge
2023-02-24T10:20:06Z
Picodes marked the issue as partial-25
#3 - Picodes
2023-02-24T10:20:23Z
Partial credit due to the absence of PoC