```\nfunction deposit(address to) external override lock returns (uint256 amountBaseOut) {\n    require(msg.sender == router, 'DAOfiV1: FORBIDDEN\_DEPOSIT');\n    require(deposited == false, 'DAOfiV1: DOUBLE\_DEPOSIT');\n    reserveBase = IERC20(baseToken).balanceOf(address(this));\n    reserveQuote = IERC20(quoteToken).balanceOf(address(this));\n    // this function is locked and the contract can not reset reserves\n    deposited = true;\n    if (reserveQuote > 0) {\n        // set initial supply from reserveQuote\n        supply = amountBaseOut = getBaseOut(reserveQuote);\n        if (amountBaseOut > 0) {\n            \_safeTransfer(baseToken, to, amountBaseOut);\n            reserveBase = reserveBase.sub(amountBaseOut);\n        }\n    }\n    emit Deposit(msg.sender, reserveBase, reserveQuote, amountBaseOut, to);\n}\n```\n