# Malicious Users Can Transfer Vault Collateral To Other Accounts To Extract Additional Yield From The Protocol

ConvexYieldWrapper's lazy checkpoint accounting lets a vault be transferred to a second account, registering the same collateral twice and double-claiming protocol yield.

- Payout: Audit contest
- Severity: high
- Program: Yield
- Found by: leastwood
- Disclosed: 2022-03-04
- Write-up quality: 7/10
- Original: https://github.com/code-423n4/2022-01-yield-findings/issues/89
- Library page: https://bugbountylibrary.com/r/c4%3A2022-01-yield%3AH-02
- Tags: domain:web3 impact:funds-loss kind:contest platform:code4rena sev:high tech:evm tech:solidity technique:source-review vuln:accounting-error vuln:business-logic vuln:reward-distribution

**Target:** ConvexYieldWrapper.sol / Ladle.sol vault accounting
**Root cause:** _getDepositedBalance sums collateral of vaults currently owned by an account, but checkpoints are only taken lazily; transferring vault ownership via Ladle.give() does not checkpoint the old or new owner, so the same vault's ink is counted for both accounts.
**Steps:**
1. Alice owns a vault with 100 tokens collateral; _getDepositedBalance returns 100 and a checkpoint records her claim to rewards.
2. Alice calls `Ladle.give()` to transfer vault ownership to Bob and calls `ConvexYieldWrapper.addVault()`.
3. Bob calls `user_checkpoint()` to update his checkpointed balance, now also counting the same 100 tokens.
4. Both Alice and Bob hold reward claims on a single vault's collateral, extracting yield multiple times.
**How found:** Manual code review of _getDepositedBalance: noticed it derives balance from current vault ownership while checkpoints are lazy, and that Ladle vault operations (give, stir, add/remove collateral) never notify the wrapper to checkpoint.
**Exploitation:** Attacker controls two accounts; deposits collateral once, checkpoints as account A, transfers the vault to account B via Ladle.give(), registers it with addVault() and checkpoints as B. Repeating across accounts multiplies reward claims on one collateral amount, draining protocol yield.
**Escalation:** Repeat the give/addVault/checkpoint cycle across many accounts to scale yield extraction.
**Insight:** When a rewards/accounting contract derives balances from an external contract's mutable ownership state, any ownership-transfer path that bypasses the wrapper's checkpoint lets the same underlying asset be counted for multiple accounts; audit every state-mutating call on the external contract for missing checkpoint hooks.
