Blueshift Docs
Ask or search…


Blueshift uses portfolios instead of pairs to hold liquidity. Lists of tokens in portfolios are managed by the community of the protocol users. By limiting the list of acceptable tokens, community prevents a risks of inflating the portfolio with low-quality assets. Besides token pools, a portfolio defines virtual token pairs. A pair is an algorithmic entity that ties two tokens and defines their exchange price (ratio). This mechanism protects the reserves from leakage if any token in a portfolio rapidly changes its price.
Each portfolio has its base token. All non-base token prices in the portfolio are determined in the base token.
Liquidity providers (LPs) can invest funds to portfolio by depositing just one token as well as an arbitrary combination of any portfolio tokens in one transaction. By adding a token LPs acquire shares of the whole portfolio and agree that invested tokens can be freely exchanged within the portfolio. For liquidity providing LPs get LP tokens of the portfolio they’ve acquired a share in. When LPs want to withdraw tokens they exchange LP tokens for portfolio tokens. LPs can withdraw just one token from the portfolio as well as a combination of portfolio tokens in one transaction.
The portfolio consists of 3 tokens: A, B and C. LP invests some amount of tokens A into portfolio and gets some LP tokens. Now LP owns a share of all portfolio tokens but not only A token that he invested. He can change back his LP tokens to any of A,B or C portfolio token.
Each portfolio has target weights of each token. If shares of portfolio tokens are equal to targets then the portfolio is in balance. If the portfolio is unbalanced then the goal of the BlueShift’s protocol is to restore the balance. The balancing mechanism is as follows:
If an adding liquidity or withdrawing operation leads balance of the portfolio, then the operation does not have prices impact and is not subject to commission.
The portfolio consists of 3 tokens: A, B and C. Target weights are 50% 10% 40%, current shares are 20% 20% 60% respectively, current with difference are -30% +10% +20% (lack of token A and excess of token B and C)
Providing liquidity: If LP provides liquidity only in tokens B and C, the LP will get less LP tokens than if the same value was provided in token A. If LP provides such a big amount of token A that leads to A token excess, the LP will get less LP tokens than if the same value was provided in combination of tokens A, B and C.
Withdrawing liquidity: If LP withdraws liquidity only in tokens A, the LP will get less tokens than if he withdrew the same value in token B or C. If LP withdraws such a big amount of token B and C that leads to the tokens lack in portfolio, the user will get less tokens than if he withdraws the same value but in combination with token A (A + B + C).