You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+86Lines changed: 86 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -88,6 +88,92 @@ The Pyth verify script validates the **Ed25519 signature** on each price message
88
88
89
89
---
90
90
91
+
## 📐 Protocol Parameters
92
+
93
+
These values are set at deployment time and enforced entirely on-chain:
94
+
95
+
| Parameter | Value | Description |
96
+
|---|---|---|
97
+
|`collateral_ratio`|**150%**| You can mint at most 66% of your ADA's USD value in synth tokens |
98
+
|`liquidation_threshold`|**120%**| Positions below this health ratio can be liquidated by anyone |
99
+
|`ada_usd_feed_id`|**16**| Pyth Lazer feed ID for ADA/USD |
100
+
101
+
**Example:** Depositing 100 ADA at $0.70/ADA ($70 collateral value) → you can mint up to **$46.67 of synth-USD**. If ADA drops to $0.56, your health ratio hits 120% and the position becomes liquidatable.
102
+
103
+
---
104
+
105
+
## 👤 User Flow
106
+
107
+
### Minting synth-USD
108
+
1. User sends ADA to the protocol pool UTxO
109
+
2. On-chain validator fetches live ADA/USD price from Pyth Lazer
110
+
3. Calculates max synth: `synth = ada × price × (100 / collateral_ratio)`
111
+
4. Minting policy issues exactly that amount of synth tokens to the user's wallet
112
+
113
+
### Burning synth-USD (withdraw ADA)
114
+
1. User decides how much ADA to withdraw
115
+
2. Validator fetches live price from Pyth Lazer
116
+
3. Calculates synth to burn: `synth_burned = ada_withdrawn × price`
117
+
4. Verifies remaining position stays above 120% health
118
+
5. User signs the transaction — synth is burned, ADA returned
119
+
120
+
### Liquidation (undercollateralized position)
121
+
1. ADA price drops → a position's health falls below 120%
122
+
2. Any user can call `Liquidate`
123
+
3. Liquidator burns synth tokens, receives the equivalent ADA from the pool
124
+
4. No owner signature required — the health condition is the only gate
-**Zero debt guard:**`health_ratio` fails immediately if `debt_amount == 0` — prevents division by zero
133
+
-**Double Option price unwrap:** Pyth feed returns `Option<Option<Int>>` — the validator explicitly handles `None` (field missing) and `Some(None)` (price unavailable), failing both cases
134
+
-**Single update enforced:**`expect [update] = updates` — rejects transactions with zero or multiple price messages
135
+
136
+
### Oracle failure handling
137
+
- If the Pyth withdraw script is not included in the transaction, `pyth.get_updates` returns an empty list and the validator fails — **no stale or missing price is ever accepted**
138
+
- The Ed25519 signature on each price message is verified by the Pyth verify script before our validator runs — invalid or replayed messages are rejected at the protocol level
139
+
140
+
### Price anomaly protection
141
+
- Price is read fresh from the oracle in every transaction — there is no cached or stored price in the datum
142
+
- The `collateral_ratio` and `liquidation_threshold` parameters provide a safety buffer against sudden price moves
143
+
144
+
---
145
+
146
+
## 💼 Business Development & Viability
147
+
148
+
### Target users
149
+
- ADA holders who want USD-denominated liquidity without selling their ADA
150
+
- DeFi users on Cardano seeking synthetic exposure to USD
151
+
- Protocols that need a decentralized, oracle-backed stablecoin primitive
152
+
153
+
### Market need
154
+
Cardano has existing decentralized stablecoins (DJED by COTI, iUSD by Indigo Protocol). Synth Peso **expands the offering** with a lightweight, single-collateral design that uses Pyth Lazer — a battle-tested, high-frequency oracle — rather than a custom price mechanism. This brings institutional-grade price feeds to Cardano CDP protocols.
Pyth Lazer offers sub-second price updates and is already used across 50+ chains — giving Synth Peso a credibility advantage at launch.
166
+
167
+
### Revenue model
168
+
Protocol fees collected on mint and liquidation events (configurable via protocol parameters). Fee revenue funds ongoing development and can be directed to a DAO treasury as the protocol matures.
169
+
170
+
### Scalability
171
+
-**No UTxO contention:** The Pyth State NFT is a reference input — any number of users can mint or burn in the same block without competing for the same UTxO
172
+
-**Permissionless liquidation:** Anyone can liquidate, eliminating the need for a centralized keeper network
173
+
-**Pyth partnership potential:** As Pyth expands its Cardano presence, Synth Peso is positioned to add new synthetic assets (BTC/USD, ETH/USD) by simply deploying new validator instances with different feed IDs
0 commit comments