function supplyPunk(
    DataTypes.ERC721SupplyParams[] calldata punkIndexes,
    address onBehalfOf,
    uint16 referralCode
) external nonReentrant {
    for (uint256 i = 0; i < punkIndexes.length; i++) {
        Punk.buyPunk(punkIndexes[i].tokenId);
        Punk.transferPunk(proxy, punkIndexes[i].tokenId);
        // gatewayProxy is the sender of this function, not the original gateway
        WPunk.mint(punkIndexes[i].tokenId);
    }
    Pool.supplyERC721(
        address(WPunk),
        punkIndexes,
        onBehalfOf,
        referralCode
    );
}
    for (uint256 i = 0; i < punkIndexes.length; i++) {
+       address owner = Punk.punkIndexToAddress(punkIndexes[i].tokenId);
+       require(owner == msg.sender);

        Punk.buyPunk(punkIndexes[i].tokenId);
        Punk.transferPunk(proxy, punkIndexes[i].tokenId);
        // gatewayProxy is the sender of this function, not the original gateway
        WPunk.mint(punkIndexes[i].tokenId);
    }
