Monday, March 14, 2022

Linear Programming to balance Cryptocurrency stakes

Let's say you are staking an asset ($ANC), both in single-stake, because you believe in it, and in an LP (because ... you ... don't? Anybody who puts an asset into an LP and watches the asset's PRICE is cray, IMO), and you want those two positions always in synch? WAT DO?


LINEAR PROGRAMMING TO THE RESCUE! And how do I do LINEAR PROGRAMMING (all caps, obvie): SPREADSHEETS! 

BECAUSE I'M ME! 

AND I GOTS TA BE ME!

Let's walk through an example.

n.b.: It's not something you can just plug a few numbers into, however: this requires work.

So, let's to this.

Exercise:

  • STEP 1: enter your singled-staked asset amount (A6)

  • STEP 2: enter the asset's portion of your LP (cell B6)

The system computes the Average for you, so skip that cell, so, next

  • STEP 3: enter the amount of the asset to be distributed (cell D6)

  • STEP 4: enter the quoted price of the asset (cell E6)

So, we have a row #. Go to that row in the linear program.
  1. HIGHLIGHT that row in GREEN.
    • note: the staked (L) and LP (M) positions should be the same-...ish number
  2. HIGHLIGHT the to_cells (H, I, J) in RED 
THOSE are your distribution amounts. So: go invest those


... and that's what I do, every day I distribute my yields to various investments that I want to keep in balance using LINEAR PROGRAMMING! and SPREADSHEETS! YAY!

No comments:

Post a Comment