feat(lazer/cardano): add inventory-edge-protocol example#103
Open
JuanCasimiro wants to merge 5 commits intopyth-network:mainfrom
Open
feat(lazer/cardano): add inventory-edge-protocol example#103JuanCasimiro wants to merge 5 commits intopyth-network:mainfrom
JuanCasimiro wants to merge 5 commits intopyth-network:mainfrom
Conversation
- Refactor console.log statements for signed integers to a single line format - Update README to reflect changes in expected output format - Ensure consistency in logging for price-related outputs
…g, pool/mint UX - README/PITCH: static review path for judges, CLI vs UI, operator pitfalls - server/load_env.ts: load .env from package root; harden stdout under concurrently - mint shadow subprocess, pool chain state, API/UI and onchain lock updates Made-with: Cursor
Made-with: Cursor
Made-with: Cursor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this adds
Inventory-Edge Protocol (
lazer/cardano/inventory-edge-protocol) — hackathon-style RealFi / RWA MVP on Cardano PreProd: a vault spending validator (Aiken / Plutus v3) that locks a demo shadow NFT, tracks synthetic debt and collateral, supports parametric insurance (strike in datum), and uses Pyth Lazer in the pull model (pyth.get_updates) for liquidation and insurance paths.Product narrative and judge-facing thesis:
PITCH.md. Full operator / auditor detail:README.md.On-chain
onchain/validators/vault.akLiquidate/ClaimInsurance.onchain/validators/liquidity_pool.akonchain/plutus.jsonaiken build.Same Pyth Lazer Cardano dependency and PreProd governance policy id as the existing reference
lazer/cardano/lazer-rwa(called out explicitly in the README).Shadow NFTs are native assets minted off-chain (Lucid + CIP-25 metadata with Lazer feed hints), not minted by this Aiken project.
Redeemers (vault)
AdjustApplyHedgestrike_raw,payout_lovelace).CloseLiquidateprice * qty * 100 < debt * 110in MVP).ClaimInsurancehedgeset andprice < strike.Off-chain stack
mock_assets, judge UI flows where noted).server/index.ts) + Vite/React judge UI (npm run demo).@pythnetwork/pyth-lazer-sdk+@pythnetwork/pyth-lazer-cardano-jsfor payloads and Pyth state resolution.Layout (high level)
lib/(transactions, feeds, Pyth helpers),scripts/(open vault, hedge, liquidate, mock assets),web/,server/,onchain/— see README §4 for the full tree.How to verify locally
Prerequisites: Node 20+, Aiken 1.1+, PreProd tADA, Lazer
ACCESS_TOKEN, Blockfrost Preprod or Maestro key (see.env.example).Suggested scripted flow:
npm run mock-assets→npm run tx:open-vault→ optionalnpm run tx:hedge→npm run tx:liquidate(needs underwater economics + token). Full UI:npm run demo→ http://127.0.0.1:5173 (API on 8787).Honest MVP limits (from README)
lib/feeds.tsmay be placeholders; XAU (346) is aligned with the reference app — confirm others via Lazer symbols API before production claims.ClaimInsurancewhen price < strike; exact payout routing to outputs is left as a product-layer refinement.License
On-chain: Apache-2.0 (see
onchain/aiken.toml).