Alchemix charges no direct fees for using the protocol. However, as Alchemix exists on the Ethereum blockchain, every action requires a transaction, paid to the Ethereum miners in gas fees.

If you're new to Alchemix, perhaps you wonder: is this worth it for me? How much money do I need to make a self-repaying loan economically viable?

This topic is an attempt to explain gas costs, and index Alchemix-related gas costs in an accessible format.

--
1) ETHEREUM TRANSACTION GAS COST

Ethereum transactions are priced with two mechanics: gas price, and gas limit.

"Gas price" is speed. The more you spend on gas price, the more likely a miner will confirm it fast.

Gas prices can vary widely with network demand. At the moment of this writing, gas prices move between 6 gwei in the quiet hours and 30-40 gwei during busier times.

"Gas limit" is distance. The more complicated a transaction, the higher the gas limit.

Gas limits boil down to the computation required by a particular action. There is a range based on the specific parameters within that transaction, but gas limits are roughly stable. Expect no more than 2x variation.

The full gas cost of an Ethereum transaction is: Gas Price * Gas Limit.

Gas price is typically denominated in "gwei". One gwei = 0.000000001 ETH.

If you sent a transaction priced at 10 gwei and using 120 000 gas limit, this transaction would cost you: 0.000000001 * 10 * 120 000 = 0.0012 ETH.

As the user, you can increase gas price if you want your transaction to confirm faster; and you can decrease gas price, at a cost of time, if you want cheaper transactions.

You should not change the gas limit suggested by your wallet provider. Lowering that gas limit may leave insufficient gas for the computation required, and your transaction would fail.

Note that wallet providers frequently overestimate gas limit by a healthy margin, often about 50%. This is fine. Any part of the gas limit left unspent is immediately refunded to you.

--
2) ALCHEMIX GAS COSTS

Here are the gas limit costs tied with different types of Alchemix transactions.

My methodology here was to go on Etherscan, look at the smart contracts, open roughly 10 transactions of each kind, and write down the minimum and maximum gas limit values.

Alchemix alUSD vault
Approve: 49k
Deposit: 59k - 129k
Mint: 101k
Liquidate: 159k - 229k
Withdrawal: 59k - 99k

SWAPS

Swap alUSD to stables on Curve
Approve: 49k
Exchange: 268k

Swap alUSD to crypto on Zapper, Metamask, Sushiswap
Approve: 49k
Swap: 104k - 134k

FARMS

ALCX/ETH SLP
Approve: 47k
Deposit: 114k - 179k
Withdraw: 95k - 142k
Harvest: 138k - 189k
Withdraw and Harvest: 116k - 162k

Other Farms
Approve: 47k
Claim: 80k - 97k
Deposit: 82k - 128k
Exit: 74k - 128k
Withdraw: 103k - 116k

(Note: "Withdraw" and "Exit" seem to be identical functions in the farm contract.)

--
3) PUTTING IT TOGETHER

To work out how much it would cost you to use Alchemix, consider your loan flow. What do you want to do with the money you're going to borrow? Farm it for ALCX rewards? Convert it to USDC and cash out to buy a boat? Depending on your goal, you can add up the required actions from the above list.

For example, let's say I want to take out an Alchemix loan, mint alUSD, swap it to ALCX, and farm the single-sided ALCX farm.

My actions would be: (alUSD vault) approve, deposit, mint, (sushiswap) approve, swap, (farm) approve, deposit.

For a complete gas limit cost of, assuming the maximum number in each range: 49k + 129k + 101k + 49k + 134k + 47k + 128k = 637 000 gas limit.

If I wait for quiet hours, I should be able to get those transactions in with a gas price of 10 gwei. Which would give us: 637 000 * 10 gwei = 0.00637 ETH, roughly $15 at current prices (1 ETH = ~$2350).

There's websites to help you with gas costs. ETH Gas Station offers a convenient calculator: https://ethgasstation.info/calculatorTxV.php

--
4) CONCLUSION

The last piece of the puzzle would be to consider your gas costs in relation to your principal, as well as the speed of the Alchemix loan repayment.

If you were to put $150 in Alchemix, the above example would cost you 10% of your principal in gas costs. With a 12% return per year on the DAI vault, it would take you almost a year just to make up for gas costs. And that return is variable, so there is no guarantee.

In my opinion, you want to play with at least a thousand dollars, for gas costs not to hurt your bottom line. That figure can perhaps be halved, if you're savvy and manage to stuff your transactions at very low gas prices. Either way, you now have some data to make your own informed decision.

    Moved to Knowledgebase because that is a lot of valuable info for newcomers. Thank you!

    Metamask is currently showing a gas limit of 14,221,905 required for borrowing AlETH against the ETH I've deposited. Presume this is because of the bug / pause on borrowing of AlETH until bug is resolved? I checked the bug announcement thread but couldn't find any update on when borrowing of AlETH is expected to resume)

    Thanks

    • n4n0 replied to this.

      Winterstoke alETH minting is paused at the moment so the transaction would fail. It's metamask's way of telling you engaging this transaction would just cost you money without working at all.

      Thank you for taking the time to write this out. It is very helpful!

      a month later

      PhiMarHal
      A doubt, for my loan to be automatically paid with time is used ethereum of my guarantee to pay gas from transactions made in the safe yearn.finance?

      No, you should not incur further gas fees after your initial deposit. The repayment would not reach out to your meta mask every time your debt is slowly reduced.

      Write a Reply...