This bounty is no longer available
Web3 DAO | Uniswap Logo

Test 1155 burning outside lock

Organization

Uniswap

Deadline

N/A

Status

ENDED


INSTRUCTIONS

Components

Lock and Call, 1155 Balances

Describe the suggested feature and problem it solves.

To burn an 1155 in exchange for pool balance, the onERC1155Received hook burns and accounts the tokens. However this function doesnt have a lock on it. I think the accountDelta function should revert if you try to transfer 1155s into the manager outside of a lock (as the lockedBy.length should be 0). However we should test this to make sure theres nothing weird you can do by calling onERC1155Received outside of a lock.

Secondly what if an unsafe transfer is done, so the onERC1155Received hook isnt called? Does the pool get a balance that then cannot be burnt?

Describe the desired implementation.

Tests for the above edgecases, and any others we can think of, to check we've covered any unplanned behaviour.

Describe alternatives.

No response

Additional context.

No response