diff --git a/.autodoc/docs/markdown/observability/etl/dataflow-etls/dataflow_etls/__init__.md b/.autodoc/docs/markdown/observability/etl/dataflow-etls/dataflow_etls/__init__.md index ffdf36835..bf78cfa58 100644 --- a/.autodoc/docs/markdown/observability/etl/dataflow-etls/dataflow_etls/__init__.md +++ b/.autodoc/docs/markdown/observability/etl/dataflow-etls/dataflow_etls/__init__.md @@ -6,7 +6,7 @@ The `MarginAccount` class has several attributes, including `account_id`, `balan The `MarginAccount` class also has several methods, including `deposit`, `withdraw`, `open_position`, and `close_position`. The `deposit` method is used to add funds to the account, while `withdraw` is used to remove funds. The `open_position` method is used to open a new position in the account, while `close_position` is used to close an existing position. -Overall, the `MarginAccount` class is an important component of the marginfi-v2 project, as it provides a way to manage margin accounts for financial trading. Here is an example of how the `MarginAccount` class might be used in the larger project: +Overall, the `MarginAccount` class is an important component of the marginfi-v2 project, as it provides a way to manage margin accounts for financial trading. Here is an example of how the `MarginAccount` class might be used in a larger project: ``` # Create a new margin account @@ -31,4 +31,4 @@ account.withdraw(2000) 2. What is the expected input format for the `cost` and `price` parameters? - It is not specified in the code what the expected input format is for `cost` and `price`. It is recommended to add comments or documentation to clarify this. 3. Are there any potential edge cases or error scenarios that the function does not handle? - - It is not clear from the code if the function handles scenarios where `cost` or `price` are negative or zero. It is recommended to add error handling or documentation to address these scenarios. \ No newline at end of file + - It is not clear from the code if the function handles scenarios where `cost` or `price` are negative or zero. It is recommended to add error handling or documentation to address these scenarios. diff --git a/.autodoc/docs/markdown/observability/etl/dataflow-etls/scripts/create_events.md b/.autodoc/docs/markdown/observability/etl/dataflow-etls/scripts/create_events.md index cd194f08a..f3c0a10a6 100644 --- a/.autodoc/docs/markdown/observability/etl/dataflow-etls/scripts/create_events.md +++ b/.autodoc/docs/markdown/observability/etl/dataflow-etls/scripts/create_events.md @@ -22,4 +22,4 @@ Overall, this script is a useful tool for testing the MarginFi-v2 project and si 3. What actions are being simulated in this script? - This script simulates a user lending USDC, creating a new MarginFi account, depositing SOL, borrowing USDC, triggering bad health by setting SOL asset weights to 0, liquidating a MarginFi account, and handling bad debt through bankruptcy. \ No newline at end of file + This script simulates a user lending USDC, creating a new MarginFi account, depositing SOL, borrowing USDC, triggering bad health by setting SOL asset weights to 0, liquidating a MarginFi account, and handling bad debt through bankruptcy. diff --git a/.autodoc/docs/markdown/programs/liquidity-incentive-program/src/errors.md b/.autodoc/docs/markdown/programs/liquidity-incentive-program/src/errors.md index 1af1a8172..29da66094 100644 --- a/.autodoc/docs/markdown/programs/liquidity-incentive-program/src/errors.md +++ b/.autodoc/docs/markdown/programs/liquidity-incentive-program/src/errors.md @@ -20,11 +20,11 @@ fn deposit_funds(amount: u64) -> ProgramResult { } ``` -In this example, the deposit_funds function checks if the deposit amount is greater than a maximum allowed amount. If it is, the function returns an error using the DepositAmountTooLarge variant of the LIPError enum. This error can then be handled by the calling code in a consistent way, regardless of where the error occurred in the project. +In this example, the deposit_funds function checks if the deposit amount is greater than the maximum allowed amount. If it is, the function returns an error using the DepositAmountTooLarge variant of the LIPError enum. This error can then be handled by the calling code in a consistent way, regardless of where the error occurred in the project. ## Questions: 1. What is the purpose of the `LIPError` enum? - The `LIPError` enum is used to define custom error codes for the `marginfi-v2` project. 2. What are the possible error messages that can be returned by this code? - The possible error messages are "Campaign is not active", "Deposit amount is too large", and "Deposit hasn't matured yet". 3. What is the significance of the `#[error_code]` attribute? - - The `#[error_code]` attribute is used to mark the `LIPError` enum as an error code enum, which allows it to be used with the `anchor_lang` crate's error handling system. \ No newline at end of file + - The `#[error_code]` attribute is used to mark the `LIPError` enum as an error code enum, which allows it to be used with the `anchor_lang` crate's error handling system. diff --git a/programs/liquidity-incentive-program/README.md b/programs/liquidity-incentive-program/README.md index 6ebc5869d..cf90835c7 100644 --- a/programs/liquidity-incentive-program/README.md +++ b/programs/liquidity-incentive-program/README.md @@ -44,7 +44,7 @@ Think of a `Campaign` as a marketing campaign: * the maximum amount of user deposits allowed * The maximum rewards to be paid out to users (together with the maximum amount of deposits allowed, this calculates the guaranteed fixed yield). -> NOTE: LIP works off of the concept of a _minimum_ guaranteed yield, but depositors may earn higher yield if marginfi's native lender yield for the related asset exceeds the yield guaranteed by the `Campaign`. This is a win-win for depositors. +> NOTE: LIP works off of the concept of a _minimum_ guaranteed yield, but depositors may earn a higher yield if marginfi's native lender yield for the related asset exceeds the yield guaranteed by the `Campaign`. This is a win-win for depositors. 3. As a proof of reward reserves, campaign creators **lock up maximum rewards to be paid out upon campaign creation**, making it easy for campaign depositors to know the source of yield. diff --git a/programs/marginfi/fuzz/README.md b/programs/marginfi/fuzz/README.md index 4d2539b86..1e96585a6 100644 --- a/programs/marginfi/fuzz/README.md +++ b/programs/marginfi/fuzz/README.md @@ -22,7 +22,7 @@ The framework directly invokes the functions that are normally invoked by the on The framework uses a bump allocator for account storage. All `AccountInfo` objects are referencing data in the bump allocator. -When an instruction is invoked we direct pass in the `AccountInfo` objects referencing allocated state. +When an instruction is invoked we directly pass in the `AccountInfo` objects referencing allocated state. Before the invoke we also copy to a local cache and revert the state if the instructions fail. ### Actions