{"id":15706967,"url":"https://github.com/btc415/monx","last_synced_at":"2025-04-20T13:31:26.309Z","repository":{"id":205657777,"uuid":"714752594","full_name":"BTC415/Monx","owner":"BTC415","description":"Monx is a Solidity smart contract project that provides a decentralized exchange (DEX) platform for trading ERC-20 tokens. The project allows users to list new tokens, add liquidity, remove liquidity, and swap tokens.","archived":false,"fork":false,"pushed_at":"2023-11-05T19:13:16.000Z","size":568,"stargazers_count":13,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-31T23:42:32.885Z","etag":null,"topics":["hardhat","solidity"],"latest_commit_sha":null,"homepage":"","language":"Solidity","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BTC415.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-11-05T18:58:00.000Z","updated_at":"2024-12-18T21:48:46.000Z","dependencies_parsed_at":null,"dependency_job_id":"c0494c13-c2e9-4aee-9ae3-3da28db9cde9","html_url":"https://github.com/BTC415/Monx","commit_stats":null,"previous_names":["topcoder415/monx","dodger213/monx","btc415/monx"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BTC415%2FMonx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BTC415%2FMonx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BTC415%2FMonx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BTC415%2FMonx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BTC415","download_url":"https://codeload.github.com/BTC415/Monx/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249902424,"owners_count":21342840,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hardhat","solidity"],"created_at":"2024-10-03T20:31:49.640Z","updated_at":"2025-04-20T13:31:25.933Z","avatar_url":"https://github.com/BTC415.png","language":"Solidity","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Monoswap Core\n\n## How to list new token?\n\n\n\u003e Listing new token requires that the token has been approved in advance.\n\u003e User can list token using `listNewToken` function\n\n```javascript\nfunction listNewToken (address _token,\n    uint _price, \n    uint256 vcashAmount, \n    uint256 tokenAmount,\n    address to);\n\n```\n\n\n_token: Token address to list\n\n_price: Token price\n\nvcashAmount: VCASH amount to add initially\n\ntokenAmount: Token amount to add initially\n\nto: Address that gets liquidity\n\n\u003e This function list tokens and add liquidity with vcashAmount and tokenAmount and send LP token to `to`\n## How to add liquidity?\n\n\u003e Adding liquidity requires that the token has been approved in advance.\n\u003e User can add liquidity using `addLiquidity` function.\n\n\u003e It adds liquidity to an ERC-20⇄ERC-20 pool.\n\n```javascript\nfunction addLiquidity (address _token, uint256 _amount, address to)\n```\n\n_token: Token address\n\n_amount: Token amount to add\n\nto: Address to send LP token\n\n\u003e For adding ETH liquidity, use `addLiquidityETH` function.\n\n\u003e It adds liquidity to an ERC-20⇄WETH pool with ETH.\n\n```javascript\nfunction addLiquidityETH (address to)\n```\n\n## How to remove liquidity?\n\u003e User can remove liquidity using `removeLiquidity` function.\n\n\u003e It removes liquidity to an ERC-20⇄ERC-20 pool.\n\n```javascript\nfunction removeLiquidity (address _token,\n    uint256 liquidity,\n    address to, \n    uint256 minVcashOut, \n    uint256 minTokenOut)\n```\n\n_token: Token address\n\nliquidity: Liquidity\n\nto: Token amount to add\n\nminVcashOut: The minimum amount of VCash that must be received\n\nminTokenOut: The minimum amount of Token that must be received\n\n\n\u003e For removing ETH liquidity, use `removeLiquidityETH` function.\n\n\u003e It removes liquidity to an ERC-20⇄WETH pool with ETH.\n## How to swap token?\n\u003e Swapping token requires that the token has been approved in advance.\n\u003e User can swap tokens using `swapExactTokenForToken` and `swapTokenForExactToken`.\n\n```javascript\nfunction swapExactTokenForToken(\n    address tokenIn,\n    address tokenOut,\n    uint amountIn,\n    uint amountOutMin,\n    address to,\n    uint deadline\n  )\n```\ntokenIn: Input token address.\n\ntokenOut: Output token address.\n\namountIn: The amount of input tokens to send.\n\namountOutMin: The minimum amount of output tokens that must be received for the transaction not to \nrevert.\n\nto: Recipient of the output tokens.\n\ndeadline: Unix timestamp after which the transaction will revert.\n\n```javascript\n function swapTokenForExactToken(\n    address tokenIn,\n    address tokenOut,\n    uint amountInMax,\n    uint amountOut,\n    address to,\n    uint deadline\n  )\n```\n\ntokenIn: Input token address.\n\ntokenOut: Output token address.\n\namountInMax: The maximum amount of input tokens that can be required before the transaction reverts.\n\namountOut: The amount of output tokens to receive.\n\nto: Recipient of the output tokens.\n\ndeadline: Unix timestamp after which the transaction will revert.\n\n\u003e For swapping ETH, use `swapExactETHForToken`, `swapExactTokenForETH`, `swapETHForExactToken`, `swapTokenForExactETH`\n\n```javascript\nfunction swapExactETHForToken(\n    address tokenOut,\n    uint amountOutMin,\n    address to,\n    uint deadline\n  )\n```\n\n```javascript\nfunction swapExactTokenForETH(\n    address tokenIn,\n    uint amountIn,\n    uint amountOutMin,\n    address to,\n    uint deadline\n  )\n```\n\n```javascript\nfunction swapETHForExactToken(\n    address tokenOut,\n    uint amountInMax,\n    uint amountOut,\n    address to,\n    uint deadline\n  )\n```\n\n```javascript\nfunction swapTokenForExactETH(\n    address tokenIn,\n    uint amountInMax,\n    uint amountOut,\n    address to,\n    uint deadline\n  )\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbtc415%2Fmonx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbtc415%2Fmonx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbtc415%2Fmonx/lists"}