Skip to content

Commit

Permalink
Merge pull request #112 from igneous-labs/cleanup/doc
Browse files Browse the repository at this point in the history
update doc
  • Loading branch information
billythedummy authored Dec 8, 2023
2 parents b89abf5 + 12bc645 commit 25f74f4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ members = [

[workspace.dependencies]
bincode = "^1"
borsh = ">=0.9" # TODO: there are probably gonna be issues from having both 0.9 and 0.10 in the workspace but idk how to fix this bec solana-program depends on both
borsh = ">=0.9" # TODO: there are probably gonna be issues from having both 0.9 and 0.10 in the workspace but idk how to fix this bec solana-program depends on both (wtf)
bytemuck = "^1"
num-derive = ">=0.3"
num-traits = ">=0.2"
Expand Down
12 changes: 8 additions & 4 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,21 +21,25 @@ The SOL value of a LST can be thought of as "how much unstaked SOL will I get in
### SOL Value Calculator Programs

Each LST program will have its corresponding SOL value calculator program that:

- calculates SOL value of a given LST amount
- calculates LST amount of a given SOL value

[Full interface definition](/docs/sol-value-calculator-programs/README.md)

### Pricing Programs

Separated from the controller program for the sake of keeping separation of concerns.

At any time, a single pricing program is active for the pool.

The pricing program has instructions that:
- determine how much SOL value should be exchanged for a given amount of LST and its SOL value + any other parameters it might require. This could include pool fee information, pool's target LST allocations, etc.
- determine how much SOL value should be redeemed for a given amount of LP tokens given the desired output LST + any other parameters it might require.
- determine how much SOL value should be minted in new LP tokens for a given amount of input LST and its SOL value, + any other parameters it might require.

These instructions are guarded by a controller program PDA signer check to ensure that they're only ever invoked via CPI from the controller program.
- determine how much SOL value should be exchanged for a given amount of LST and its SOL value + any other accounts it might require. This could include pool fee information, pool's target LST allocations, etc.
- determine how much SOL value should be redeemed for a given amount of LP tokens given the desired output LST + any other accounts it might require.
- determine how much SOL value should be minted in new LP tokens for a given amount of input LST and its SOL value, + any other accounts it might require.

[Full interface definition](/docs/pricing-programs/README.md)

## General Guidelines

Expand Down

0 comments on commit 25f74f4

Please sign in to comment.