@obligate/strukk-sdk
v0.3.3
Published
SDK for Strukk Financial Contracts Platform
Downloads
78
Maintainers
Readme
Strukk Financial Contracts Platform
Strukk is a facilitation platform for establishing automated self-settling financial contracts between issuers and investors. The platform currently supports one type of contract (Strukk.Yield a Barrier Reverse Convertible) with Sol as the underlying asset.
Components
1. Instruct Program
The main Solana program that handles the core functionality of structured products.
Key features:
- Initialize structured products
- Handle investor and issuer acceptance
- Manage payments and settlements
- Handle defaults
2. Payment Authority BRC Program
A specialized program for Barrier Reverse Convertible (BRC) contracts.
Key features:
- Initialize BRC contracts
- Fix payments based on price updates
- Close BRC contracts
3. Treasury Wallet Program
Manages the issuer's treasury wallet for handling payments.
Key features:
- Initialize treasury wallets
- Add and remove withdraw authorizations
- Handle withdrawals
4. InstructSdk
A TypeScript SDK for interacting with the Instruct, Treasury Wallet, and Payment Authority BRC programs.
Functionality
Contract Initiation:
- Investor sets desired parameters and requests a quote
- Issuer provides a quote
- Coordinator/authority initializes the structured product
- Investor signs the transaction that includes acceptance and transfers funds to escrow
- Issuer signs the transaction to accept and issues the structured product receiving the funds from the escrow
- Fees go to the coordinator/authority
- Investor receives on-chain confirmation of the claim in the Structured Product account
Final Settlement:
- At maturity, the payoff is determined by comparing the oracle-provided price with the barrier price
- Payoff is automatically claimed from the issuer's treasury wallet
- If the balance is insufficient or payment does not occur for any reason, a default can be triggered
- Repayments can be done after pay_from_date has passed
- Default can be triggered after pay_by_date has passed
BRC final fixing calculation:
- Parameters: Maturity date, Yield (p.a.), Barrier
- At maturity:
- If price > barrier: Investor receives principal + coupon in cash
- If price <= barrier: Investor receives the initial principal amount of SOL at the initial fixing price + coupon in cash
Usage
To interact with the Strukk platform, use the InstructSdk to create and manage structured products, handle investor and issuer actions, and manage payments and settlements.
Development
- Set up a Solana development environment
- Install dependencies:
pnpm install
- Build the programs:
anchor build
- Run tests:
anchor test
Note
This README provides an overview of the main components and functionality. For detailed implementation and usage, refer to the individual source files.