1657201560
This repository contains routing logic for the Uniswap V3 protocol.
It searches for the most efficient way to swap token A for token B, considering splitting swaps across multiple routes and gas costs.
First make sure you have run npm install
and npm run build
.
npm run test
Make sure the .env
file is configured to connect to mainnet and other chains. See the CLI section below for more details.
npm run integ-test
The package can be run as a CLI for testing purposes.
First create a .env
file in the root of the project and configure:
JSON_RPC_PROVIDER = '<JSON_RPC_PROVIDER>'
To run on chains other than mainnet set up a connection by specifying the environment variable
JSON_RPC_PROVIDER_{CHAIN} = '<JSON_RPC_PROVIDER>'
For example, specifying a provider for Optimism :
JSON_RPC_PROVIDER_OPTIMISM = '<JSON_RPC_PROVIDER>'
Then from the root directory you can execute the CLI.
Some examples to use for manual CLI testing.
./bin/cli quote --tokenIn 0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48 --tokenOut 0x1f9840a85d5af5bf1d1762f925bdaddc4201f984 --amount 1000 --exactIn --recipient 0xAb5801a7D398351b8bE11C439e05C5B3259aeC9B --protocols v2,v3
Best Route:
100.00% = USDC -- 0.3% --> UNI
Raw Quote Out:
35.72
Gas Adjusted Quote Out:
34.03
Gas Used Quote Token: 1.691772
Gas Used USD: 47.592951
Calldata: 0x414bf389000000000000...
Value: 0x00
blockNumber: "13088815"
estimatedGasUsed: "113000"
gasPriceWei: "130000000000"
./bin/cli quote-to-ratio --token0 0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48 --token1 0xdac17f958d2ee523a2206206994597c13d831ec7 --feeAmount 3000 --recipient 0xAb5801a7D398351b8bE11C439e05C5B3259aeC9B --token0Balance 1000 --token1Balance 2000 --tickLower -120 --tickUpper 120
Best Route:
100.00% = USDT -- 0.05% --> USDC
Raw Quote Exact In:
392.68
Gas Adjusted Quote In}:
346.13
Gas Used Quote Token: 46.550010
Gas Used USD: 46.342899
Calldata: 0x414bf389000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec7000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4800000000000000000000000000000000000000000000000000000000000001f4000000000000000000000000ab5801a7d398351b8be11c439e05c5b3259aec9b000000000000000000000000000000000000000000000000000000000000006400000000000000000000000000000000000000000000000000000000176a736c000000000000000000000000000000000000000000000000000000001764f8650000000000000000000000000000000000000000000000000000000000000000
Value: 0x00
blockNumber: "13239188"
estimatedGasUsed: "113000"
gasPriceWei: "116690684398"
./bin/cli quote --tokenIn 0x5592ec0cfb4dbc12d3ab100b257153436a1f0fea --tokenOut 0x4DBCdF9B62e891a7cec5A2568C3F4FAF9E8Abe2b --amount 200000 --exactIn --minSplits 1 --router alpha --chainId 4
./bin/cli quote --tokenIn 0x4f96fe3b7a6cf9725f59d353f723c1bdb64ca6aa --tokenOut 0xd0a1e359811322d97991e03f863a0c30c2cf029c --amount 10 --exactIn --minSplits 1 --router alpha --chainId 42
./bin/cli quote --tokenIn 0x07865c6e87b9f70255377e024ace6630c1eaa37f --tokenOut 0xc778417e063141139fce010982780140aa0cd5ab --amount 200000 --exactIn --minSplits 1 --router alpha --chainId 3
./bin/cli quote --tokenIn 0x7F5c764cBc14f9669B88837ca1490cCa17c31607 --tokenOut 0xDA10009cBd5D07dd0CeCc66161FC93D7c9000da1 --amount 200000 --exactIn --minSplits 1 --router alpha --chainId 10
./bin/cli quote --tokenIn 0x7F5c764cBc14f9669B88837ca1490cCa17c31607 --tokenOut 0xDA10009cBd5D07dd0CeCc66161FC93D7c9000da1 --amount 200 --exactIn --minSplits 1 --router alpha --chainId 69
./bin/cli quote --tokenIn 0xfd086bc7cd5c481dcc9c85ebe478a1c0b69fcbb9 --tokenOut 0x82af49447d8a07e3bd95bd0d56f35241523fbab1 --amount 20000 --exactIn --minSplits 1 --router alpha --chainId 42161 --debug
./bin/cli quote --tokenIn 0x09b98f8b2395d076514037ff7d39a091a536206c --tokenOut 0xb47e6a5f8b33b3f17603c83a0535a9dcd7e32681 --amount 200 --exactIn --minSplits 1 --router alpha --chainId 421611
./bin/cli quote --tokenIn 0x001b3b4d0f3714ca98ba10f6042daebf0b1b7b6f --tokenOut 0x9c3c9283d3e44854697cd22d3faa240cfb032889 --amount 1 --exactIn --protocols v3 --recipient 0xAb5801a7D398351b8bE11C439e05C5B3259aeC9B --minSplits 1 --router alpha --chainId 80001
./bin/cli quote --tokenIn 0x2791bca1f2de4661ed88a30c99a7a9449aa84174 --tokenOut 0x7ceb23fd6bc0add59e62ac25578270cff1b9f619 --amount 5 --exactIn --minSplits 1 --protocols v3 --router alpha --chainId 137
Download Details:
Author: Uniswap
Source Code: https://github.com/Uniswap/smart-order-router
License: GPL-3.0 license
#uniswap #blockchain #ethereum #defi #typescript #smartcontract
1657201560
This repository contains routing logic for the Uniswap V3 protocol.
It searches for the most efficient way to swap token A for token B, considering splitting swaps across multiple routes and gas costs.
First make sure you have run npm install
and npm run build
.
npm run test
Make sure the .env
file is configured to connect to mainnet and other chains. See the CLI section below for more details.
npm run integ-test
The package can be run as a CLI for testing purposes.
First create a .env
file in the root of the project and configure:
JSON_RPC_PROVIDER = '<JSON_RPC_PROVIDER>'
To run on chains other than mainnet set up a connection by specifying the environment variable
JSON_RPC_PROVIDER_{CHAIN} = '<JSON_RPC_PROVIDER>'
For example, specifying a provider for Optimism :
JSON_RPC_PROVIDER_OPTIMISM = '<JSON_RPC_PROVIDER>'
Then from the root directory you can execute the CLI.
Some examples to use for manual CLI testing.
./bin/cli quote --tokenIn 0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48 --tokenOut 0x1f9840a85d5af5bf1d1762f925bdaddc4201f984 --amount 1000 --exactIn --recipient 0xAb5801a7D398351b8bE11C439e05C5B3259aeC9B --protocols v2,v3
Best Route:
100.00% = USDC -- 0.3% --> UNI
Raw Quote Out:
35.72
Gas Adjusted Quote Out:
34.03
Gas Used Quote Token: 1.691772
Gas Used USD: 47.592951
Calldata: 0x414bf389000000000000...
Value: 0x00
blockNumber: "13088815"
estimatedGasUsed: "113000"
gasPriceWei: "130000000000"
./bin/cli quote-to-ratio --token0 0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48 --token1 0xdac17f958d2ee523a2206206994597c13d831ec7 --feeAmount 3000 --recipient 0xAb5801a7D398351b8bE11C439e05C5B3259aeC9B --token0Balance 1000 --token1Balance 2000 --tickLower -120 --tickUpper 120
Best Route:
100.00% = USDT -- 0.05% --> USDC
Raw Quote Exact In:
392.68
Gas Adjusted Quote In}:
346.13
Gas Used Quote Token: 46.550010
Gas Used USD: 46.342899
Calldata: 0x414bf389000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec7000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4800000000000000000000000000000000000000000000000000000000000001f4000000000000000000000000ab5801a7d398351b8be11c439e05c5b3259aec9b000000000000000000000000000000000000000000000000000000000000006400000000000000000000000000000000000000000000000000000000176a736c000000000000000000000000000000000000000000000000000000001764f8650000000000000000000000000000000000000000000000000000000000000000
Value: 0x00
blockNumber: "13239188"
estimatedGasUsed: "113000"
gasPriceWei: "116690684398"
./bin/cli quote --tokenIn 0x5592ec0cfb4dbc12d3ab100b257153436a1f0fea --tokenOut 0x4DBCdF9B62e891a7cec5A2568C3F4FAF9E8Abe2b --amount 200000 --exactIn --minSplits 1 --router alpha --chainId 4
./bin/cli quote --tokenIn 0x4f96fe3b7a6cf9725f59d353f723c1bdb64ca6aa --tokenOut 0xd0a1e359811322d97991e03f863a0c30c2cf029c --amount 10 --exactIn --minSplits 1 --router alpha --chainId 42
./bin/cli quote --tokenIn 0x07865c6e87b9f70255377e024ace6630c1eaa37f --tokenOut 0xc778417e063141139fce010982780140aa0cd5ab --amount 200000 --exactIn --minSplits 1 --router alpha --chainId 3
./bin/cli quote --tokenIn 0x7F5c764cBc14f9669B88837ca1490cCa17c31607 --tokenOut 0xDA10009cBd5D07dd0CeCc66161FC93D7c9000da1 --amount 200000 --exactIn --minSplits 1 --router alpha --chainId 10
./bin/cli quote --tokenIn 0x7F5c764cBc14f9669B88837ca1490cCa17c31607 --tokenOut 0xDA10009cBd5D07dd0CeCc66161FC93D7c9000da1 --amount 200 --exactIn --minSplits 1 --router alpha --chainId 69
./bin/cli quote --tokenIn 0xfd086bc7cd5c481dcc9c85ebe478a1c0b69fcbb9 --tokenOut 0x82af49447d8a07e3bd95bd0d56f35241523fbab1 --amount 20000 --exactIn --minSplits 1 --router alpha --chainId 42161 --debug
./bin/cli quote --tokenIn 0x09b98f8b2395d076514037ff7d39a091a536206c --tokenOut 0xb47e6a5f8b33b3f17603c83a0535a9dcd7e32681 --amount 200 --exactIn --minSplits 1 --router alpha --chainId 421611
./bin/cli quote --tokenIn 0x001b3b4d0f3714ca98ba10f6042daebf0b1b7b6f --tokenOut 0x9c3c9283d3e44854697cd22d3faa240cfb032889 --amount 1 --exactIn --protocols v3 --recipient 0xAb5801a7D398351b8bE11C439e05C5B3259aeC9B --minSplits 1 --router alpha --chainId 80001
./bin/cli quote --tokenIn 0x2791bca1f2de4661ed88a30c99a7a9449aa84174 --tokenOut 0x7ceb23fd6bc0add59e62ac25578270cff1b9f619 --amount 5 --exactIn --minSplits 1 --protocols v3 --router alpha --chainId 137
Download Details:
Author: Uniswap
Source Code: https://github.com/Uniswap/smart-order-router
License: GPL-3.0 license
#uniswap #blockchain #ethereum #defi #typescript #smartcontract
1611193822
Router Protocol is a crosschain-liquidity aggregator platform that was built to seamlessly provide bridging infrastructure between current and emerging Layer 1 and Layer 2 blockchain solutions. The goal is to enable users to swap their assets from different networks seamlessly in a near-instant and low-cost manner
As a multi blockchain future becomes a reality, there is a critical need for infrastructure that can port liquidity across chains for the ecosystem to develop.
Ethereum has been great — It is the first Turing-complete, trustless ‘world computer’ of its kind. And we are just tapping into the full potential of Ethereum, which should be unleashed with Eth 2.0 and its transition to POS over the coming months and years.
However the fact remains that, scalability efforts are still in their early days, as most platforms continue with the scalability trilemma — the trade off between decentralization, scalability and security. Layer 2 solutions include Bitcoin’s Lightning network, as well as multiple solutions for Ethereum such as Plasma. Layer 1 solutions include Sharding, as well as consensus protocol changes that inevitably involve various sliding-scale trade offs across the axes of the scalability trilemma. While Eth 2.0 promises tps (transactions per second) figures of over 100000 at some point in the future, there are significant technical hurdles to be overcome before the sharding in ETH 2.0 can get there. In the meanwhile, most major blockchain solutions offer tps figures far less than that seen on Visa, Mastercard or PayPal, which are atleast 1500 tps, even from a conservative standpoint.
Therefore we have multiple efforts addressed towards scalability — In addition to Eth 2.0 there are consensus protocol approaches such as Dfinity, Tezos, Polka and Cosmos as well as Layer 2 solutions such as Matic, Omisego, xDAI etc. There is no one conclusive winner yet, and it might be that the future of blockchains will be multi-chain for quite a while, with a fragmented market with liquidity and developer community dispersed across these.
In this scenario, what will be needed is the infra that will seamlessly port liquidity between these isolated liquidity pools, almost like highways connecting far flung cities. The development of railways starting in the early 1800s helped develop the US economy and laid foundations for it to become the super power of the 20th century; This also led to the development of various cities across the United States. Similarly, cross-chain bridging infrastructure will help promote liquidity migration and developer efforts towards various emerging chains and solutions, and eventually lead to a thriving, bustling blockchain ecosystem.
Router is a cross chain liquidity infrastructure primitive that aims to seamlessly provide bridging infra between various current and emerging layer-1 and layer-2 blockchain solutions, such as Matic and Ethereum.
Progressively, Router plans to build out bridging infra between multiple other chains in its roadmap. Stay tuned as we roll out the product and expand on our roadmap over the coming few weeks.
The decentralized ecosystem consists of over 6,000 cryptocurrencies that currently operate in closed-off, isolated infrastructures, unable to access neither the liquidity nor the functionality offered by each other. Protocols and communities across the entire industry are continually battling each other to claim their spot in the emerging Web 3.0 paradigm. And while the rise of Web 3.0 is inevitable, it’s still too early to tell what the ecosystem will look like — will it evolve into a monopoly, with the entire space dominated by a single blockchain platform, or will it turn into an oligopoly, where a handful of protocols control the market?
What is clear, however, is the need for bridging these fragmented networks. With these 6,000 different cryptocurrencies on the market encapsulating over $752 billion in value, there has never been a more pressing need for porting liquidity across them. As more institutional investors join the crypto space, the need for better efficiency and flexibility increases almost exponentially.
The crypto industry was built on a fundamental premise; the fragmentation and limitations endemic to traditional finance needed to be replaced with a better, more robust system built with user needs front and center. The world of traditional finance, while dealing with a wide variety of asset classes, is a deeply flawed one — the limitations it essentially put upon itself do more to facilitate rent-seeking behavior than actually benefiting its users. Unfortunately, several of these legacy encumbrances have been grandfathered into our new world of blockchains.
When the need to transfer assets from one blockchain system to another occurs, users are kept in the dark on exactly what goes on under the hood, and are forced to pay high fees to facilitate technically simple transfers. For example, when writing this post — the cost of transferring value on Ethereum is almost at all-time high of $10+ and if you want to use a service like Uniswap to swap tokens — the fees is north of $50.
Router Protocol wants to resolve this issue, which is becoming increasingly important as the world gets more globally connected. We at Router believe that the future lies in cross-chain interoperability. The crypto industry doesn’t have to suffer from the fragmentation seen in traditional finance.
One of the most integral parts of the emerging Web 3.0 paradigm is liquidity farming. While opinions are divided on the topic, liquidity farming is here to stay and should be seen as a largely positive development in the crypto industry. Unlike the data farming that shaped the Web 2.0 era, yield farming in the Web 3.0 ecosystem will provide users with real, tangible benefits — a steady trickle of yield.
With Web 3.0 being all about startups building products around various facets of capital flows, the rise of financial primitives such as loans seems inevitable.
But, the trustless, open-source nature of the emerging Web 3.0 ecosystem is set to result in a large number of closed-off projects, each competing for a tiny part of the market. Such a fragmented market is set to produce multiple Layer 1 and Layer 2 solutions working to make their systems more efficient.
As a cross-chain liquidity infrastructure primitive, Router Protocol aims to provide a seamless bridge between those Layer 1 and Layer 2 blockchain platforms. Aside from connecting blockchains and enabling a free flow of information, Router will also make smart order-routing possible, enabling users to swap their assets from different networks seamlessly. Utilizing Router will be completely transparent and users will be able to see what goes on “under the hood” every time they interact with the protocol.
Liquidity Landscape after Router Protocol
Being transparent, however, doesn’t have to mean being complicated. Those interacting with Router Protocol will be able to enjoy a rather hands-off user experience — when swapping assets, the system will automatically find the best market price and execute the swap.
The first major product coming from Router Protocol will be a bridge between the Matic Network and Ethereum. A bridge between Matic and Ethereum will provide a scaling solution to Ethereum that is near-instant, low-cost, and incredibly flexible. It will enable users to get the best of both worlds — Matic users will reap the benefits of Ethereum’s unprecedented liquidity, while Ethereum users will be able to utilize Matic’s scalability and high throughput.
In the future, Router plans on building bridging infrastructure between multiple other blockchains and blockchain solutions. Stay tuned as we roll out new products and expand our roadmap in the coming weeks. Router protocol will extend interoperability to many different layers. We are currently considering Avalanche, Binance Smart Chain, Cardano, Algorand, Solana, Stellar, Polkadot, and Litecoin.
Total Supply: 20,000,000 ROUTE
Initial Circulating Supply: 1,022,865 ROUTE
Token Distribution
Seed Round: 600,000 ROUTE, 3.00% of Total Supply
Private Round: 1,521,818 ROUTE, 7.61% of Total Supply
Reward Pool: 3,444,000 ROUTE, 17.22% of Total Supply
Ecosystem Fund: 5,084,000 ROUTE, 25.42% of Total Supply
Team: 3,000,000 ROUTE, 15.00% of Total Supply
Liquidity Provision Fund: 350,000 ROUTE, 1.75% of Total Supply
Foundation: 4,000,000 ROUTE, 20.00% of Total Supply
Strategic Partners: 2,000,000 ROUTE, 10.00% of Total Supply
Token Vesting Schedule
Seed Round: Vesting over 15 months with 6 month cliff
Private Round: Vesting over 9 months
Reward Pool: Locked in Smart Contract for daily distribution over 12 months per reward programs
Ecosystem Fund: 8% unlock at day 0, 7% unlock at month 3, remaining distributed monthly 17 months
Team: 10% unlock at month 9, remaining distributed monthly for 12 months
Liquidity Provision Fund: 80,000 unlock at day 0, 30,000 at day 30, remaining distributed quarterly for 12 months
Foundation: 10% unlock at month 9, remaining distributed monthly for 12 months
Strategic Partners: Vesting over 12 months
Initial Circulating Supply at listing:1,022,865 ROUTE(5.11% of Total Supply), including:
-304,364 ROUTE from private investors unlock
-80,000 ROUTE from liquidity provision fund
-406,720 ROUTE from ecosystem fund
-31,371 ROUTE from reward pool
-200,000 ROUTE from strategic partners
Looking for more information…
☞ Website ☞ Explorer ☞ Source Code ☞ Social Channel ☞ Message Board ☞ Message Board 2 ☞ Coinmarketcap
Would you like to earn ROUTE right now! ☞ CLICK HERE
Top exchanges for token-coin trading. Follow instructions and make unlimited money
☞ Binance ☞ Bittrex ☞ Poloniex ☞ Bitfinex ☞ Huobi
Thank for visiting and reading this article! I’m highly appreciate your actions! Please share if you liked it!
#blockchain #bitcoin #crypto #router protocol #route
1610429951
Smart contracts is a digital code stored in a blockchain and automatically executes when predetermined terms and conditions are met. In Simple terms, they are programs that run by the setup of the people who developed them.They are designed to facilitate, verify, and execute a digital contract between two parties without the involvement of third parties.
Greater efficiency and speed
Accuracy and transparency
Trust
Robust Security
Independent verification
Advanced data safety
Distributed ledger
Ease of use
Open source technology
Better flexibility
Easy integration
Improved tractability
Today Smart contracts are used in various platforms such as supply-chain management,cross-border financial transactions,document management,enforceability and more. Here are the Sectors where smart contracts plays a huge role ,
There are a few Important things that you need to consider before you develop a Smart Contract,
Ask Yourself -
I hope this blog was helpful. We think this is the right time for companies to invest in building a blockchain powered Smart Contracts as Blockchain technology and the ecosystem around it is changing fast. If you’re thinking about building a Smart Contract but not sure where to start, contact us, we’re happy to provide free suggestions about how blockchain’s Smart Contracts may fit into your business.
We Employcoder Leading IT Outsourcing Company with a team of Smart Contract Experts. Hire Smart Contract Developers from us who can code bug-free, scalable, innovative, fully-functional smart contracts for your business and make your business or enterprise eye-catchy & trutworthy among the people in the digital globe.
#hire smart contract developers #smart contract developer #smart contract development #smart contract development services, #smart contract development company, #smart contract programmers
1607516513
We (Codezeros) are Smart Contract Development Company in Washington. We provide the complete solution for smart contracts like smart contract architecture, design & development, auditing & optimization. We have experienced developers who are expert in developing smart contracts as well as DApp development, pitch deck development, and many other services related to Blockchain Technology.
#smart contract creation #smart contract company #blockchain smart contract #smart contract development #smart contract service provider #smart contract development company
1616572311
Originscale order management software helps to manage all your orders across channels in a single place. Originscale collects orders across multiple channels in real-time - online, offline, D2C, B2B, and more. View all your orders in one single window and process them with a simple click.
#order management system #ordering management system #order management software #free order management software #purchase order management software #best order management software