Preface
If you aren't already aware, there are 1-2 bots that are constantly adding new ways to determine if someone is about to slurp an ALCX bond - and then beat them to it. This has resulted in an arms race that the bot is largely winning, causing many users to stop bonding altogether. The lack of bond demand means the bots are getting a lot of heavily discounted ALCX, which means the Alchemix DAO is not getting as many of the assets they are bonding for. Seeking to put an end to the arms race, @dixie and I reached out to the flashbots discord and found a developer, @0xFadedFace, who was willing to help.
How to Safely One-Off Bond
If you are looking to purchase ALCX tokens via bonding, and are not selling ALCX in order to do so, then you will not need to use the tool we've created. All you need to do to prevent being front-run is submit the bonding transaction as a private transaction via the flashbots rpc, instructions here: https://medium.com/alchemistcoin/how-to-add-flashbots-protect-rpc-to-your-metamask-3f1412a16787. This means the transaction will not be made public until after it has been successful, meaning the front-running bots don't have a chance to see you're about to bond until it's too late.
Context Behind the Bonding Arms Race
Many users adopted the continuous bonding strategy detailed here: https://forum.alchemix.fi/public/d/232-how-to-outperform-single-stake-alcx-with-bonding. However, quickly bots started to emerge. First, they would pick up any bonding transactions when they were submitted and submit a higher gas bit in the same block, which usually led to the human bonder's transaction failing. Using flashbots was a work around for awhile, but then the bot started looking for other activities that would indicate a bond was about to occur (actions taken by users who had approved the bond contracts such as swapping ALCX to WETH, zapping into the SLP, claiming ALCX, etc). The entire purpose of the bot was to let the discount get as high as possible and slurp the bond the instant before someone else bonded. There were some workarounds - using cowswap to swap, or sending the ALCX to a different address and swapping there, then sending the bond asset back to the bonding address. But these were also quickly accounted for by the bot. The only way to stop the bot from front running was to do EVERYTHING (redeem ALCX, swap ALCX for bond asset, and bond) in one private transaction. And that's what you can do now!
How to Safely Continuous Bond
We went thru a lot of iterations, but ultimately came up with a very easy-to-use solution! Here's how you do it:
Setup (one time)
You need to give the badbot contract permission to spend your ALCX. To do that:
- Go to the ALCX token contract: https://etherscan.io/address/0xdbdb4d16eda451d0503b854cf79d55697f90c8df#writeContract
- Connect your wallet to etherscan
- Under write contract, go to the approve function, and enter the badbot contract address for the "spender" and (2256)-1 as the "amount":
Spender: 0xbaDb0710c62454307a1a9c50aBc9967601A78A81
Amount: 115792089237316195423570985008687907853269984665640564039457584007913129639935

- Click "write" and approve the transaction. The bot killer is ready to go!
Bonding
- Go to https://olympus-rslb.herokuapp.com/
- Enter your ETH address in the "address" line, ENS is supported!
- The UI will update to show how much ALCX you have from 5 sources - the 4 bond types (no tALCX right now) and your wallet (no single stake right now, but you can exit that manually to your wallet)
- Check the boxes for the ALCX you'd like to use. You can use the full amount from the bonds, and a partial amount from your wallet (use the slider or manually type in the number to the right of the slider). If you want to use a partial amount of ALCX from a bond type, you'll have to manually claim it to your wallet first.
- Flip thru the dropdown menu to decide which bond you'd like to execute
- Verify that the "you will get" ALCX is less than the "max payout" ALCX or adjust to make it so
- Verify that the "you will get" ALCX is less than the "ALCX treasury remaining" ALCX or adjust to make it so
- Click "generate multicall data". Copy the multicall data that is generated.
- Click "open etherscan". This will take you to the custom multical contract.
- Connect your wallet to etherscan with the "connect to web3" button
- Set your RPC to flashbots
- Paste the multicall data in the "redeemSwapLPBond" function and click "write"

- This will generate a transaction in metamask. Adjust the gas settings if desired and approve it! (MAKE SURE YOU'RE ON FLASHBOTS)
- Note the multicall data will remain valid for 5 minutes, but I reccomend you paste it ASAP to minimize the chances of the transaction reverting. There is a maximum slippage built in to prevent getting wrecked on a bad swapping route, so executing the transaction quickly minimizes the effect of any changes between blocks that could make the path invalid.
Thanks
Thank you to Alchemix for funding this venture, thank you to @dixie for being a huge part of all the discussions to get this thing specced out, and thank you to @0xfadedface for answering our call in the flashbots discord and working on this with us over the last month.
Intricacies
The app reported discount may not match olympus pro. This is partially because Olympus Pro uses coingecko price feeds for the front end (which are delayed), and partially because the front end accounts for slippage when swapping (a hidden cost you may not have been accounting for before!). The front end reads directly from the Olympus Pro contracts which use live price feeds, and therefore will be more accurate than the Olympus Pro front end.
Vulnerabilities:
0xfadedface is hosting the front end currently. I own the multicall contract. These are the current centralization compromises. There are limited attack vectors - always be sure you are using the badbot contract address. If the tool proves popular and safe, we will look to more officially bring it under the Alchemix umbrella. As of right now this should be viewed as a community-built project with limited review from the core team.