Open sherlock-admin opened 1 year ago
Set label to high
because based on what the report indicated.
@sourabhmarathe can you elaborate on what aspect of the report made this a high? https://github.com/sherlock-audit/2022-10-illuminate-judging/issues/104 describes a separate way of how to mint IPT using protocol fees
I was just updating the issue to reflect what the Watson had put on the report. To me, it appeared mislabeled as the original report had a high level severity at the top of the report.
Re #104: It should not be marked as a duplicate. It's a separate issue in it's own right. That said, it doesn't put user funds at risk, so I think it should remain at a Medium.
I dont quite think this should be valid all given we are not planning to accept any niche tokens that would include fee on transfers. (We are launching DAI, USDC, stETH)
The admin currently has complete control over market creation meaning suggested remediations increase gas costs for our users with very minimal or no benefit at the moment!
Escalate for 1 USDC
Reminder @Evert0x
Escalate for 1 USDC
Reminder @Evert0x
You've created a valid escalation for 1 USDC!
To remove the escalation from consideration: Delete your comment. To change the amount you've staked on this escalation: Edit your comment (do not create a new comment).
You may delete or edit your escalation comment anytime before the 48-hour escalation window closes. After that, the escalation becomes final.
Escalate for 50 USDC See sponsor's comments.
I dont quite think this should be valid all given we are not planning to accept any niche tokens that would include fee on transfers. (We are launching DAI, USDC, stETH)
The admin currently has complete control over market creation meaning suggested remediations increase gas costs for our users with very minimal or no benefit at the moment!
While USDT can be upgraded to have FoT, this is an external condition, therefore this issue might be more properly described as a medium at best.
Escalate for 50 USDC See sponsor's comments.
I dont quite think this should be valid all given we are not planning to accept any niche tokens that would include fee on transfers. (We are launching DAI, USDC, stETH)
The admin currently has complete control over market creation meaning suggested remediations increase gas costs for our users with very minimal or no benefit at the moment!
While USDT can be upgraded to have FoT, this is an external condition, therefore this issue might be more properly described as a medium at best.
You've created a valid escalation for 50 USDC!
To remove the escalation from consideration: Delete your comment. To change the amount you've staked on this escalation: Edit your comment (do not create a new comment).
You may delete or edit your escalation comment anytime before the 48-hour escalation window closes. After that, the escalation becomes final.
Escalation accepted
Escalation accepted
This issue's escalations have been accepted!
Contestants' payouts and scores will be updated according to the changes made on this issue.
IllIllI
high
Fee-on-transfer underlyings can be used to mint Illuminate PTs without fees
Summary
Fee-on-transfer underlyings can be used to mint Illuminate PTs without fees
Vulnerability Detail
Illuminate's
Lender
does not confirm that the amount of underlying received is the amount provided in the transfer call. If the token is a fee-on-transfer token (e.g. USDT which is currently supported), then the amount may be less. As long as the fee is smaller than Illuminate's fee, Illuminate will incorrectly trust that the fee has properly been deducted from the contract's balance, and then will swap the funds and mint an Illuminate PT.Impact
Theft of unclaimed yield
Attackers can mint free PT at the expense of Illuminate's fees.
Code Snippet
This is one example from one of the
lend()
functions, but they all have the same issue:https://github.com/sherlock-audit/2022-10-illuminate/blob/main/src/Lender.sol#L750-L780
And separately, if any of the external PTs ever become fee-on-transfer (e.g. CTokens, which are upgradeable), users would be able to mint Illuminate PT directly without having to worry about the FOT fee being smaller than the illuminate one, and the difference would be made up by other PT holders' principal, rather than Illuminate's fees:
https://github.com/sherlock-audit/2022-10-illuminate/blob/main/src/Lender.sol#L270-L288
POC
Imagine that the Illuminate fee is 1%, and the fee-on-transfer fee for USDT is also 1%
lend()
functions for 100 USDTlend()
does thetransferFrom()
for the user and gets 99 USDT due to the USDT 1% feelend()
calculates its own fee as 1% of 100, resulting in 99 USDT remaininglend()
swaps the 99 USDT for a external PTTool used
Manual Review
Recommendation
Check the actual balance before and after the transfer, and ensure the amount is correct, or use the difference as the amount