implemented minStake
This commit is contained in:
parent
72abf097df
commit
b94f5559dd
4 changed files with 38 additions and 32 deletions
|
|
@ -386,6 +386,7 @@ contract BaseLineLP {
|
|||
}
|
||||
|
||||
// call this function when price has moved up 15%
|
||||
// TODO: write a bot that calls this function regularly
|
||||
function shift() external {
|
||||
require(positions[Stage.ANCHOR].liquidity > 0, "Not initialized");
|
||||
// Fetch the current tick from the Uniswap V3 pool
|
||||
|
|
@ -425,6 +426,7 @@ contract BaseLineLP {
|
|||
ethInAnchor = (ethInAnchor > ethBalance / 10) ? ethBalance / 10 : ethInAnchor;
|
||||
|
||||
currentTick = currentTick / TICK_SPACING * TICK_SPACING;
|
||||
harb.setPreviousTotalSupply(harb.totalSupply());
|
||||
_set(sqrtPriceX96, currentTick, ethInAnchor);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue