Users who deposit Lyra LP as collateral will lose OP vault rewards
When users deposit Lyra LP tokens as collateral, the tokens are transferred to a vault that does not implement a method to claim or distribute OP rewards. As a result, users lose all OP rewards they would have earned.
Source: https://github.com/sherlock-audit/2022-11-isomorph-judging/issues/78
Found by
0x52
Summary
Optimism currently offers yield farming opportunities for Lyra LPs, see OP Reward Announcement. Every 2 weeks Lyra LPs split a claimable pool. When they use their Lyra LP as collateral, it is transferred to the Lyra vault which means that all OP will be instead claimable by the vault. The vault currently doesn't implement any method to claim or distribute those tokens. The result is a loss of user yield on their Lyra tokens. Aside from the loss of funds, it also highly disincentivizes users from using Lyra tokens as collateral.
Vulnerability Detail
See summary.
Impact
Lyra LPs that use their tokens as collateral will lose all their OP rewards
Code Snippet
Tool used
Manual Review
Recommendation
It's unclear how long OP rewards will continue but it seems like other protocols have been getting 6 months of incentives. Since they are temporary I would recommend not integrating reward distribution directly into the contract. I would recommend adding a function to claim rewards to the Isomorph treasury. After the rewards end, the Isomorph should create an airdrop to distribute those tokens to users during that period of time.
Discussion
kree-dotcom
Fixed, https://github.com/kree-dotcom/isomorph/commit/f1b5bbcb10909041f2da6b0074518142790919c6 .
Added a function claimLyraRewards which allows the Vault to claim any token rewards it is eligible for. These are then sent to the admin and will be allocated to end users using a similar system that Lyra currently has of off-chain balance snapshots and a MultiDistributor.sol contract by which users claim their rewards.
0x00052
Fixes look good. Adds an admin only function that allow OP rewards to be claimed and later distributed
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
The vault contract lacks a function to claim and distribute OP rewards earned by the deposited Lyra LP tokens.
Impact
Lyra LPs that use their tokens as collateral will lose all their OP rewards.
What the attacker needed
User deposits Lyra LP tokens as collateral
The fix
The vault was fixed by adding a function to claim Lyra rewards, which are sent to the admin for later distribution to users.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
Lyra LP tokens represent a share in a liquidity pool and earn OP rewards. When you use them as collateral, they are moved to a vault. The vault has no way to claim those OP rewards, so the rewards are lost.
What is Business logic?
The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.