The _harvestAndReport(...)
does not taken into account the claimable
transmuter.
When report(...)
is called on the strategy, it will call _harvestAndReport()
that will get the new total assets by doing following things:
Get the unclaimed balance of alETH
deposited into the transmuter.
Add the balance of any dormant WETH
that is stored in the strategy itself.
Add the alETH
balance of the strategy.
Github Link
And all of the above combined will form the new total assets. And report function will check this with the old total assets. If it is more than the old we have a profit otherwise loss. And this is also when the new shares will be minted to the strategy and the total assets will be increased to match the new total assets. Over the time these new shares will be burned so that the profit is realized by the depositors. But in _harvestAndReport(...)
function, claimable
balance of WETH
that is exchanged into the transmuter that is not taken into consideration probably because the claimAndSwap(...)
is called before the report which will fetch the claimable balance and will exchange it to the alETH
again and deposit it into the transmuter again. But this is not what sponsors have in mind. They have confirmed that they might not claim the whole balance because of the slippage issues. And also they were under the wrong impression that transmuter.getUnexchangedBalance(address(this))
fetches the balance which will also include the claimable balance and were hesitant about the double counting of the balance.
Also as per them, there could also be some potential delay between when claimAndSwap(...)
is called and when report(...)
is called. So even if the whole balance is claimed in the claimAndSwap(...)
there are chances that there is new claimable
balance for the time between that period. And that could also be potentially big enough if the amount is big. Because the default unlock period of the profit is 10 days
and if the tokens are some big amount then we will have potentially big amount as a claimable
again if new WETH
comes into the contract.
So if claimable tokens are not taken into account then _harvestAndReport(...)
will give the wrong total assets and there will losses or less profit will be shown.
POC:
output:
We can see the loss above due to not account for the claimable balance.
There are chances of potentially losses.
Manual Review
Foundry
It is recommended to take into account the claimable
balance in _harvestAndReport(...)
and use some oracles or exchange input for getting the quote for that claimable
WETH to alETH
. Then it will give the correct balacne.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.