You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 26, 2023. It is now read-only.
Marketplace.setPrincipal do not approve needed allowance for Element vault and APWine router
Summary
Marketplace.setPrincipal do not approve needed allowance for Element vault and APWine router
Vulnerability Detail
Marketplace.setPrincipal is used to provide principal token for the base token and maturity when it was not set yet. To set PT you also provide protocol that this token belongs to.
In case of APWine protocol there is special block of code to handle all needed allowance. But it is not enough.
Suggested severity is Low on the grounds that we have an admin method that would allow us to handle these particular approvals. That being said, we will be implementing a fix based on this report.
Issue will stay medium severity, although Illuminate is able to fix it using admin powers.. it's still a broken codebase that can potentially impact user funds.
rvierdiiev
medium
Marketplace.setPrincipal do not approve needed allowance for Element vault and APWine router
Summary
Marketplace.setPrincipal
do not approve needed allowance forElement vault
andAPWine router
Vulnerability Detail
Marketplace.setPrincipal
is used to provide principal token for the base token and maturity when it was not set yet. To set PT you also provide protocol that this token belongs to.In case of
APWine
protocol there is special block of code to handle all needed allowance. But it is not enough.https://github.com/sherlock-audit/2022-10-illuminate/blob/main/src/Marketplace.sol#L231-L236
In
Marketplace.createMarket
function 2 more params are used to provide allowance of Lender for Element vault and APWine router.https://github.com/sherlock-audit/2022-10-illuminate/blob/main/src/Marketplace.sol#L182
ILender(lender).approve(u, e, a, t[7]);
But in
setPrincipal
we don't have such params and allowance is not set. SoLender
will not be able to work with that tokens correctly.Impact
Lender will not provide needed allowance and protocol integration will fail.
Code Snippet
Provided above.
Tool used
Manual Review
Recommendation
Add 2 more params as in
createMarket
and callILender(lender).approve(u, e, a, address(0));
The text was updated successfully, but these errors were encountered: