Proposal: Fastlane Gas Savings

Proposal: Fastlane Gas Savings

Expected on Snapshot June 12, 2023.

TL;DR

  • The Fastlane was originally proposed here:
  • This proposal suggests a redesign of the Fastlane smart contract to help it function more efficiently
    • Lowering the required gas should enable more arb opportunities
  • The proposed changes
    • Support flashloans in any token
    • Support multiple flashloans in a single transaction
    • Send half the TKN to the caller and half to the Carbon vortex
      • As opposed to the old design of converting TKN to BNT, sending half to the caller and half to the token contract.

Impact of Changes

  • Support flashloans in any token
    • Should lower the costs to get some TKNs and increase arb opportunities
  • Support multiple flashloans in a single transaction
    • Should provide the contract with additional flexibility to capture more arbs
  • Send half the TKN to the caller and half to the Carbon vortex
    • This solves multiple problems (including how to calculate how much BNT to send to the caller if we are taking loans in multiple tokens), but most importantly, gas savings.
  • No more BNT cap for fastlane callers
    • As the caller gets rewarded in TKN not BNT

How can gas costs be reduced?

Two expensive transactions will be removed from the contract and replaced with cheaper actions.

Updated flow:

  1. Take a flashloan in any token
  2. Trade to close some arb opportunity
  3. Repay flashloan
  4. Send the relevant portion of tokens to CarbonVortexcontract
  5. Send the rest to the caller

By removing the requirement to trade the tokens to BNT and burn them, and replace them with a transfer, the estimated gas reduction is in the range of 250k per loan (trade is approx. 250k-300k while a transfer is approx. 40k-50k).

Implications

  • The Fastlane will no longer be burning BNT directly.
  • Instead, it will arb and send fees to the CarbonVortex contract (For much less gas)
    • It will send the TKN gains from arbing to the CarbonVortex contract
    • The CarbonVortex contract has a public function anyone can call to convert Carbon fees in the form of TKN to BNT and burn it: CarbonVortex - Carbon Dev
    • Should this proposal pass, I will propose a method to burn these TKN via a public function as well.
  • Therefore, the arb fast lane becomes siloed from BNT burning, which becomes the sole activity of the Carbon vortex.
  • The overall architecture is more efficient in terms of gas, which may result in better arbitrage engagement, better volumes and order fulfillment.

FOR

Update the Fastlane Contract as outlined above.

AGAINST

Take no action.

7 Likes

I fully support this proposal.

This improves the gas efficiency of the arbitrage contract significantly.

If anyone has questions or concerns regarding the proposed mechanics, feel free to voice them here or to reach out to me to discuss them!

5 Likes

Love the progress on all of this. Fully support!

5 Likes

We support this proposal as it will improve the efficiencies of the bot!

4 Likes