Open sherlock-admin opened 2 years ago
Though the issue is likely valid, along with Sherlock's scoring guide, this likely does not end up being accepted as a valid issue as no funds are at risk: https://docs.sherlock.xyz/audits/watsons/judging
While the intention of the method is to allow an admin to set a new converter, this is simply a convenience/upgradability method meaning no funds are at risk for any deployments.
@JTraversa Wouldn't funds be at risk since the Redeemer would be unable to convert PTs to underlying, for users to redeem their IPTs? Looking at some of the other issue comments though, I believe this would will fall under the admin input validation category, and would thus be classified as Low
Funds would be at risk if we upgraded the converter contract and changed its implementation.
That said, this is not "normal" execution for the protocol, and the method setConverter
was simply added at a later time for convenience if we should ever need to do so.
So the feature that is not operational is the upgradability of the converter, rather than any actual funds potentially lost from operation.
The converter should never need to be upgraded unless we add additional protocol integrations, and with the current implementation this would require a full redeployment given the static array of potentially integration principal tokens.
So I'd see this as a low severity issue impacting upgradability solely.
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.
hyh
medium
Converter cannot be changed in Redeemer
Summary
Redeemer's setConverter() can be used to switch the converter contract, for example when new type of interest bearing token is introduced as Converter employs hard coded logic to deal with various types of IBTs. However new converter cannot be functional as there is no way to introduce the approvals needed, it can be done only once.
Vulnerability Detail
Upgrading the converter contract is not fully implemented as switching the address without providing approvals isn’t sufficient, while it is the only action that can be done now.
Impact
If there are some issues with converter or IBTs it covers there will not be possible to upgrade the contract.
Also, as currently the converter uses hard coded logic to cover Compound, Aave and Lido only, any new IBT cannot be introduced to the system as it requires new Converter to be rolled out for that.
Given that substantial part of Redeemer's logic is dependent on Converter's exchange from IBT to underlying that means the net impact can be up to massive fund freeze.
Code Snippet
setConverter() allows for changing the converter contract:
https://github.com/sherlock-audit/2022-10-illuminate/blob/main/src/Redeemer.sol#L145-L152
approve() can provide the approvals needed, but it's
marketPlace
only:https://github.com/sherlock-audit/2022-10-illuminate/blob/main/src/Redeemer.sol#L201-L207
And there
approve
is run solely on the new market introduction, via createMarket():https://github.com/sherlock-audit/2022-10-illuminate/blob/main/src/Marketplace.sol#L120-L201
And via setPrincipal():
https://github.com/sherlock-audit/2022-10-illuminate/blob/main/src/Marketplace.sol#L203-L243
In both cases it's required that either Illuminate or
market
isaddress(0)
, i.e. both functions cannot be run repeatedly.I.e. it's impossible to run approve if the market exists, so there is no way to approve and use new Converter as without approval it will not be functional, the corresponding Redeemer functions will be reverting as it's expected that converter can pull funds out of Redeemer.
Currently Converter functionality is fixed to deal with 3 types of IBTs:
https://github.com/sherlock-audit/2022-10-illuminate/blob/main/src/Converter.sol#L21-L51
Tool used
Manual Review
Recommendation
Consider running the approvals setting on the introduction of the new Converter, i.e. run Marketplace's createMarket() approval logic as a part of Redeemer's setConverter(), also clearing the approvals for the old one.