Platform: Code4rena
Start Date: 21/06/2022
Pot Size: $55,000 USDC
Total HM: 29
Participants: 88
Period: 5 days
Judge: gzeon
Total Solo HM: 7
Id: 134
League: ETH
Rank: 23/88
Findings: 4
Award: $578.37
🌟 Selected for report: 0
🚀 Solo Findings: 0
🌟 Selected for report: Lambda
Also found by: 0x29A, Chom, cryptphi, itsmeSTYJ, kenzo, kirk-baird, sashik_eth
https://github.com/code-423n4/2022-06-illuminate/blob/main/marketplace/ERC5095.sol#L108-L119 https://github.com/code-423n4/2022-06-illuminate/blob/main/redeemer/Redeemer.sol#L275-L296
The ERC5095.redeem() allows the redeeming of Principal Tokens for Underlying Tokens to a receiver.
When calling the the function, if the caller is not the holder of iPTs, then they can set a principalAmount
that is larger than the allowance, allowing the receiver to receive more tokens that was approved by holder.
ERC5095.redeem()
and inputs 100 tokens as principalAmount
, her address as receiver and Bob's address as holder.Redeemer.authRedeem()
is called and 100 PT is burned from Bob's address and Alice receives 100 underlying tokens for the market.Manual review
The principalAmount
argument should be less than or equals to the approved spend allowance.
#0 - KenzoAgada
2022-06-28T06:18:49Z
Duplicate of #173
🌟 Selected for report: Picodes
Also found by: Chom, Lambda, auditor0517, cryptphi, csanuragjain, hansfriese, hyh, kenzo, kirk-baird, pashov, unforgiven, zer0dot
82.1689 USDC - $82.17
https://github.com/code-423n4/2022-06-illuminate/blob/main/redeemer/Redeemer.sol#L206-L227 https://github.com/code-423n4/2022-06-illuminate/blob/main/redeemer/Redeemer.sol#L240-L262 https://github.com/code-423n4/2022-06-illuminate/blob/main/redeemer/Redeemer.sol#L107-L148 https://github.com/code-423n4/2022-06-illuminate/blob/main/redeemer/Redeemer.sol#L158-L194
From the statement as documented in https://code4rena.com/contests/2022-06-illuminate-contest#redemption-specifics , lenders can redeem their capital with a redeem method on Redeemer.sol
. However, there is no function or logic which actually ensures this can be performed.
All redeem() functions in Redeemer.sol redeem the PTs for their respective underlying token and keeps in the Redeemer contract, there is no provision for users to exchange for equivalent backing of underlying tokens except by using the authorized iPT EIP-5095 redeem method
All redeem() functions in Redeemer.sol call the redemption method for underlying token and they are held by Redeemer contract.
Manual review
a function or logic that makes provision for users to be able to exchange for their underlying token directly.
#0 - sourabhmarathe
2022-06-29T16:44:07Z
Illuminate's redeem
method is supposed to perform this, but due to a bug, it does not do so. I will mark this issue as a duplicate of the issues that indicated that.
Duplicate of #384.
#1 - JTraversa
2022-07-02T18:21:53Z
I'd say wardens should take a quick look at this one and see whether it is pointed enough to be a duplicate? Unsure though 🤷
https://github.com/code-423n4/2022-06-illuminate/blob/main/redeemer/Redeemer.sol#L191-L194
The redeem method for Notional Protocol is incomplete, the else-if-statement only gets the amount to redeem but no redemption is made.
INotional(principal).maxRedeem(address(this))
outputs the the balance of the redeemer contract as seen in https://github.com/notional-finance/wrapped-fcash/blob/019cfa20369d5e0d9e7a38fea936cc649704780d/contracts/wfCashERC4626.sol#L90
Manual review
An additional line to redeem the amount ouput.
#0 - KenzoAgada
2022-06-28T08:28:34Z
Duplicate of #341
🌟 Selected for report: Kumpa
Also found by: Metatron, cccz, cryptphi, hansfriese, jah, kenzo, kirk-baird, pashov, poirots
https://github.com/code-423n4/2022-06-illuminate/blob/main/lender/Lender.sol#L192-L235
The lend() function (line-192) for illuminate and yield principal tokens deduct a fee when purchasing the PTs but does not add the deducted fee to the accumulated fees for the token, which means Admin does not get fees for both illuminate and Yield PTs like it does on other PTs.
https://github.com/code-423n4/2022-06-illuminate/blob/main/lender/Lender.sol#L219 https://github.com/code-423n4/2022-06-illuminate/blob/main/lender/Lender.sol#L229
Above lines deducted calculated fee, but not added to the mapped fees state variable.
Manual review
Add the deducted fee to fees
state variable.
#0 - KenzoAgada
2022-06-28T16:04:59Z
Duplicate of #208