Lending Tutorial

(7 minutes)


Help


Margin lending

Tutorial (video)
Demo account

Funding at Bitmex

Explanation
How to

Lending strategies


The bot of Crypto Lend is a computer program running 24/7. Its job is to take care of lending money on Bitfinex and Poloniex.

On a period of 365 days in 2015-2016, it generated approximately :

  • 19% on USD on Bitfinex
  • and 20% on bitcoins on Poloniex.

This return average was made of very high rates during short "bubbles" and low to middle rates during quite long periods.

We recommend reading on margin lending before going further:

  • Bitfinex Margin funding: link
  • Poloniex Margin lending: link
  • Quoine Margin lending: link

Drop and forget

If you would like to earn interest without spending time, our default settings will do the job.

Strategies

If you would like to search for higher returns, our bot can follow different strategies. Find below the details on the available strategies:

  • Basic strategy
  • Automatic strategy
  • Long maturity strategy
  • Spread funds over time
  • Spread funds into book depth

Before explaining the strategies we must define some expressions.

Definitions


Before explaining the strategies, we must define some expressions:

Total Rate

Total Rate = total gain / average balance [projected in %/year]

--> Total Rate = (total gain / number of days)*365.0 / average balance

Use Rate

The Use Rate is the percent of your capital used at a given time. For instance, if you have 10 BTC in your balance, of which 5 BTC is lent and 5 BTC is currently not lent (offered or not) --> then your Use Rate is 50%.

In this example, if you get a lending rate of 0.05%/day, you will "loose" 2.5mBTC/day, waiting for higher rates.

How to Lend on Poloniex


First, create an account on Poloniex and deposit some bitcoins to the Lending wallet.

Then go to the API menu and create an API key with the minimum rights (simply uncheck everything) to ensure that this API key does not allow withdrawal or trading.

Poloniex Key

If you activated the Poloniex IP Access Restriction feature, please check that you entered your bot's IP (see left side dashboard menu)

Then, come back here and create an account (please choose a unique password).

Enter your Poloniex API key and secret code in your account.

Select a strategy.

Let Crypto Lend do the lending for you and enjoy the returns.

When you have enough, juste disable Poloniex lending strategy, or disable your API key on Poloniex.

For security reasons, our bot may delete your API keys in the following cases :

  1. Wrong key or secret
  2. Key disabled at exchange side
  3. Key re-used from another bot
  4. Account balance empty during a few days
  5. No lending during a few days
To fix this issue: create a new key at your exchange and copy it here.

How to Lend on Bitfinex


First, create an account on Bitfinex and transfer some bitcoins or USD to the Funding wallet.

Then go to the API menu and create an API key with the following permissions : Margin Funding Read + Margin Funding Write + Wallets Read.

Bitfinex key

The above permissions ensure that this API key does not allow withdrawal nor trading.

Then, come back here and create an account (please choose a unique password).

Enter your Bitfinex API key and secret code in your account.

Select a strategy

Let Crypto Lend optimize the lending for you and enjoy the returns.

When you have enough, juste disable Bitfinex lending strategy, or disable your API key on Bitfinex.

For security reasons, our bot may delete your API keys in the following cases :

  1. Wrong key or secret
  2. Key disabled at exchange side
  3. Key re-used from another bot
  4. Account balance empty during a few days
  5. No lending during a few days
To fix this issue: create a new key at your exchange and copy it here.

How to Lend on Quoine


First, create an account on Quoine and transfer some money to the wallet.

Then go to the API menu and create an API key with the following permissions : Account Read + Execution Read + Orders Read and Write.

Quoine key

The above permissions ensure that this API key does not allow withdrawal nor trading.

Then, come back here and create an account (please choose a unique password).

Enter your Quoine API key and secret code in your account.

Select a strategy

Let Crypto Lend optimize the lending for you and enjoy the returns.

When you have enough, juste disable Quoine lending strategy, or disable your API key on Quoine.

Warning: Quoine loans don't have term. Your loans may have very long duration. Read Quoine lending FAQ.

For security reasons, our bot may delete your API keys in the following cases :

  1. Wrong key or secret
  2. Key disabled at exchange side
  3. Key re-used from another bot
  4. Account balance empty during a few days
  5. No lending during a few days
To fix this issue: create a new key at your exchange and copy it here.

Basic strategy


The Basic strategy automatically places offers with all your available balance, at the best rate possible to maximize the Use rate. A new calculation will be done every minute.

To use this strategy, you must adjust the following settings :

Min depth amount [in currency] is the depth of the lendbook to move through before placing the offer. This is used to skip very low rate offers.

Max duration offer [in minute] is the maximum time to keep your offers. For instance, if the bot places an offer at 10:15 and the max duration is set to 30 minutes --> then at 10:45, if the offer is not yet filled it will be removed and the bot will reformulate a new one. This is used to follow the rate closely and maximize the Use Rate. You can disable the feature by setting it to 0.

Min offer amount [in currency] will block offers if your available balance is less than this limit. In this case, the bot will wait for a larger available balance. This is used to prevent numerous small offers on Poloniex.

Min offer rate [in %/day] will block new offers as long as higher rate is not available. This setting can be used to ignore very low rate.

Threshold long offer [in %/day] is a rate limit. Below this limit the bot will do offers with duration of 2 days. And over this limit, offers duration will be 30 days / 60 days (Btifinex/Poloniex). This is used to profit of high rates and be more reactive on low rates.

Automatic strategy


This strategy is an upgrade of the Basic strategy. It aims to skip temporary drops of rate in the lendbook.

For this, it will make 'Min offer rate' dynamic, to block new offers if the offer rate is too low for a moment.

The picture below shows the Intraday chart. The light blue line is the rate at which an offer will be made when funds are available.

The dark blue line is the minimum rate, calculated by the Automatic strategy. No offer will be created if light blue line is below dark blue line.

The black line is your funds available for lending.

Automatic strategy

There is 1 setting for this strategy:

  • Max rate [in %/day] is the limit above which this strategy is disabled. This value will determin the maximum value for the movable Min offer rate.
  • Long maturity strategy


    This strategy is an upgrade of the Basic strategy. The goal is to prioritize rates over maturity. The bet is that 30-days loans will be closed out long before 30 days, so we can focus on highest available rates whatever the maturity.

    This strategy uses the bids and asks books, ie. the lenders side and the borrowers side. It also gets the last matched loans.

    Between those three books the strategy searches the best rate. Indeed sometime the highest bid rate is better than the lowest ask rate, but with a longer maturity, for instance with loans for 30-days instead of 2-days.

    It will create an offer with the best rate found, with the corresponding maturity.

    Rate = max of (max of( last n matches), max demand rate, min offer - minimum depth)

    This strategy is activated on top of the basic, and it can be used in parrallel with the Automatic strategy

    Warning: this strategy bypasses the settings Thresold long offer and Max loan duration. It may place 30 days offers.

    There is 1 setting for this strategy:

    • Last N matches: The Long maturity strategy parses through the N last matched loans to get the last max rate. Default is 20.

    Spread funds over time


    Initial split strategy

    The idea is to retain part of your available funds to spread it over time, so that your loans are split in small chunks and you can benefit from an average rate.

    For example, if you have 10 bitcoins available and your split window is of 48 hours : then your available amount will be of 2.5 bitcoins after 12 hours, 5 bitcoins after 24 hours and 7.5 after 36 hours.

    This strategy doesn't take into account the runtime changes (like new funds added in the meantime). It is rather dedicated to an initial spreading, or a large return of your funds.

    Warning: this strategy is especially useful for large balance.

    There are 2 settings for this strategy:

    • Split window [in hours]: The period of time in hours over which the Initial split strategy divide your fund. Default is 48h.
    • Split threshold [in %]: The percent of your fund available to trigger the start of the Initial split strategy. Default is 60%.

    Iceberg strategy

    This strategy will limit the maximum amount of your funds being offered on the market at the same time.

    Each time a new offer is taken, then the strategy will refill with a new amount.

    This strategy will create an Iceberg-like offer and will split your funds in many small amounts over time.

    Warning: this strategy is especially useful for large balance.

    There is 1 setting for this strategy:

    • Iceberg Max Offer [in currency]: The max amount of your funds being offered at the same time. Warning: Default value is 0. This will block all your funds.

    Spread funds into book depth


    Book depth strategy

    Coming soon ... we are currently working on this new strategy

    Risks


    Please consider seriously the risks of lending your money on Bitfinex and Poloniex.

    The main risk is the Couterparty risk. That is to say a default of the exchange.

    The reasons can be :

    • hack of the exchange : example,
    • fraud or seizure,
    • a very large price movement where loans can not be covered, nor insured.

    Please also check twice that the API keys communicated on our site do not allow withdrawal nor trading.

    And don't forget that your capital will not be available for the time of the loans.

    Funding at Bitmex


    You can earn interest by shorting the Bitmex XBTUSD swap product. More information on the Bitmex blog.

    We display the 8h funding rate historical chart in our Rates page. You will notice that the XBTUSD swap funding rate can be negative. In theory it could be possible to reduce your capital instead of earning interest.

    But for the funding rate to become negative the swap has to trade at a significant discount (negative premium) from the spot price over an 8 hour period. Have a look at the funding calculations and the .XBTUSDPI8H index: here and here.

    If the swap is trading at a 0.20% discount from spot (say) and the predicted funding rate for the next period is going to be -0.15%, then you have the option of closing your short at that 0.20% discount (i.e. 0.20% profit) instead of holding and paying 0.15%. This is why the blog post says 'limited' risk rather than 'no' risk. Indeed, a negative funding rate is always short lived because it encourages traders to long the swap and so then discount disappears and the funding rate goes back to positive - it is self correcting.

    Due to the underlying interest component and the nature of the funding premium index the funding rate is overwhelmingly positive on average. If you had shorted XBTUSD on 1st September 2016 and held until end november you would have received 18.6018% in positive funding, paid 2.6652% in negative funding, and earnt in total 15.9366% which gives an annualised return of 66%.

    How to use Cryptolend for funding at Bitmex ?


    Warning 1: When entering a position with Cryptolend bot, you accept to short Bitmex XBTUSD derivatives. Your bitcoins will be changed into USD equivalent value, so the loss in BTC value can be substantial. There is a high risk of losing your capital or getting negative interest, depending on your strategy and on the bitcoin trend. Please document yourself a lot and use with extreme caution.

    Warning 2: Bitmex fees for opening or closing a position is 0.075%. So don't activate and disable funding too many times.

    Warning 3: Beta version. We are still doing modification on this feature. We will detail any change in the Annoucements Box.

    Cryptolend automates the process described in the Bitmex blog, to help you focus on earning interest.

    First, deposit funds to Bitmex and create an API with only Order rights (uncheck Withdraw rights). Come back here and fill in your API key in the section Account, then activate the funding in the section Strategy.

    The button Activate funding will sell XBTUSD contracts with your full BTC balance (1x leverage). For instance, if your balance is 1 BTC, and the price is 500$, then it will short XBTUSD with 500 contracts. Monitor the interest earned in the section Loans. For each $ earned, our engine will automatically increase your position with 1 XBTUSD contract, so the interest will be compounded. Our engine will also close your position if rates become too low.

    In the Expert mode in the section Strategy you can change the following settings:

    1. Close position under rate [in %/8h]: Will close your position by rebying all XBTUSD contracts when the funding rate goes under this value [in %/8h]
    2. Open position over rate [in %/8h]: Will open a position by selling XBTUSD contracts with available balance when the funding rate is over this value [in %/8h]
    3. Position leverage: Warning ! If you change the default value (1.0), this setting will open position on leverage. You should then watch closely the Margin call price, as Cryptolend doesn't have any protection mechanism. We higly recommend to let this setting untouched. Max value = 5.0. Contact us for any question.

    The button Disable funding will close your position by rebuying all XBTUSD contracts and disable the strategy. You can then withdraw your funds from Bitmex if needed.

    We are really interested by your remarks or feature request. Please contact us here

    Contact us


    We are very interested by your remarks, questions or feature requests : Contact us