Skip to content

Commit

Permalink
Update strategy_writing_guide.md
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcoWorms authored Sep 7, 2023
1 parent 3053ef8 commit df5cd4b
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions docs/developers/v3/strategy_writing_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ To create your Tokenized Strategy, you must override at least three functions ou

___

1. *_deployFunds(uint256 _amount)*
1. *_deployFunds(uint256 _amount)*<br/>

**Purpose**:
- This function is called during every deposit into your strategy to allow it to deploy the underlying asset just deposited into the yield source.
Expand All @@ -95,7 +95,7 @@ ___
yieldSource.deposit(asset, _amount);
}

2. *_freeFunds(uint256 _amount)*
2. *_freeFunds(uint256 _amount)*<br/>

**Purpose**:
- This function is called during withdraws from your strategy if there are not enough idle assets to service the full withdrawal.
Expand All @@ -120,7 +120,7 @@ ___
yieldSource.withdraw(asset, _amount);
}

3. *_harvestAndReport()*
3. *_harvestAndReport()*<br/>

**Purpose**:
- Called during every report. This should harvest and sell any rewards, reinvest any proceeds, perform any position maintenance and return a full accounting of a trusted amount denominated in the underlying asset that the strategy holds.
Expand Down Expand Up @@ -161,7 +161,7 @@ Simply overriding those three functions will make your strategy a fully function
While that may be all that's necessary for some of the most simple strategies, generally most strategists will add a bit more customization or complexity to their strategy. Five more optional functions can be overridden by a strategist to continue to build out their Tokenized Strategy.


1. *availableDeositLimit(address _owner)*
1. *availableDeositLimit(address _owner)*<br/>

**Purpose**:
- This is called during any deposits and can be used to enforce any deposit limit or white list that the strategist desires.
Expand All @@ -188,7 +188,7 @@ While that may be all that's necessary for some of the most simple strategies, g
return totalAssets >= depositLimit ? 0 : depositLimit - totalAssets;
}

2. *availableWithdrawLimit(address _owner)*
2. *availableWithdrawLimit(address _owner)*<br/>

**Purpose**:
- This is called during every withdraw and can be used to enforce any witdhraw limit the strategist desires.
Expand Down Expand Up @@ -230,7 +230,7 @@ While that may be all that's necessary for some of the most simple strategies, g
}
}

3. *_tend(uint256 _totalIdle)*
3. *_tend(uint256 _totalIdle)*<br/>

**Purpose**:
- This would get called during a `tend` call and can be used if a strategy needs to perform any maintenance or other actions that don't require a full report. If used the strategy should also implement a `tendTrigger` that keepers can monitor to know when it should be called.
Expand Down Expand Up @@ -258,7 +258,7 @@ While that may be all that's necessary for some of the most simple strategies, g
}
}

4. *tendTrigger()*
4. *tendTrigger()*<br/>

**Purpose**:
- Should return whether or not a keeper should call `tend` on the strategy. This should be implemented if tend is needed to be used.
Expand All @@ -284,7 +284,7 @@ While that may be all that's necessary for some of the most simple strategies, g
}
}

5. *_emergencyWithdraw(uint256 _amount)*
5. *_emergencyWithdraw(uint256 _amount)*<br/>

**Purpose**:
- Allows management the option to manually pull funds from the yield source once a strategy has been shutdown.
Expand Down

0 comments on commit df5cd4b

Please sign in to comment.