Overnight smart contracts
Overnight smart contracts overview
Portfolio manager
Portfolio manager is a smart contract that runs the algorithm that rebalances the portfolio to meet the investment strategy.
Hold information about the target weights
strategyWeights
for the strategies. If necessary, performs the asset reallocation process using thebalance
method.
Portfolio manager receives M2M data and compares the portfolio structure to the Investment strategy. In case the asset weight is below the minimum or above the maximum specified, It will initiate trades required to meet the target asset weights. For example, in the case of a large deposit, the portfolio manager will see the weight of cash exceed the maximum percentage and thus deploy the excess cash into the relevant lending and liquidity strategies. It will do the opposite in case of a large withdrawal.
Portfolio manager contains three methods available only for the EXCHANGER
role:
deposit
- receives assets and places them incashStrategy
until the limit is reached. If the limit is exceeded, then it starts balancing for distributing assets to all strategies according to target weightswithdraw
- withdraws assets from strategies to return to the client. If there are enough assets incashStrategy
, then use them, otherwise starts balancing with the withdrawal of the required amount of assets from the strategiesclaimAndBalance
- starts collecting (claiming) rewards for strategies with the subsequent balancing of the portfolio to target values
There are also management methods available for the ADMIN
role:
balance
- start balancing assets between strategies to match the given target valuessetStrategyWeights
- setting target values for strategiessetCashStrategy
- assigns which strategy to use ascashStrategy
- which is a buffer for assets, preventing permanent balancing
Mark2Market
Mark2Market provides functionality for obtaining information about current assets managed by strategies and their value in USDC. Information about the value of each asset in USDC is provided by the strategies themselves.
Has the following public methods:
strategyAssets
- getting a pivot table for the value of current assets managed by strategies
totalNetAssets
- total value of assets managed by all strategies at USDC equivalent
totalLiquidationAssets
- the potential amount of USDC, which can be obtained with a full withdrawal of assets from all strategies
Last updated