---
# System prepended metadata

title: execution logic

---

# execution logic

purpose: a rough framework for consider the point of execution for the keeper bot ie what we sent to chain to do 

Execution Logic
1- From rebalancing logic and vualt factory we arrive at a difference of glp postions and external hedges we would like to change, and our set of internal positions per vault

2 We do a check on whether we can do external link/uni hedges (how do we check)
    - gmx margin available if its 80% used we dont use it?
    - funding costs (Static rule?)
    
3- if the above check isnt satisfied turn the link and uni into a correlation hedge with insert corr model?

 

4- Here is where we can make a decision on what to execute  what are the things that make us now want to execute knowing what we want to do, some execution rules, if not satisfied we dont execute the full size
    burning or minting a lot of glp (expensive)
    really high funding costs (strategy wont make money) static rules?
    
If these are not satisfied you go back to the delta fit but with a larger buffer? (ie try and deploy less)
    

4- We execute the trades taht would be us selling assets
5- we execute the trades that has us buying assets
6- How long does it take to burn glp do we need logic like burning takes x then we buy perps wiht it?