← Protocols
Kresko
01Description

Non-custodial synthetic-asset protocol on EVM (Diamond/EIP-2535 architecture). Users deposit collateral (KISS, USDC, ETH, BTC, LSTs) into the Kresko Protocol and mint Kresko Assets (krAssets) — synthetic derivatives tracking external prices (krETH, krBTC, krTSLA, krGOLD, krEUR, etc.) priced via an on-demand + push oracle blend.

02Best for
  • 01synthetic equity / commodity / FX exposure on-chain
  • 02minting krAssets (e.g. krBTC, krTSLA, krGOLD) against crypto collateral
  • 03leveraged synthetic positions without a centralized issuer
  • 04DeFi composability of synthetic tracker tokens
03Install
  • pnpm add viem
04Environment variables
VariableScopeDescription
NEXT_PUBLIC_KRESKO_DIAMONDClientKresko Protocol Diamond contract (EIP-2535) — single entry point for all deposit/mint/burn/withdraw facets on the target chain.
NEXT_PUBLIC_KRESKO_KISSClientKISS — Kresko's overcollateralized stablecoin used as the canonical collateral and quote asset.
05Prompt snippet
Use Kresko for synthetic-asset exposure. The protocol is a single Diamond (EIP-2535) — every action goes through facets on one address. Flow: `IERC20(collateral).approve(diamond, amount); IKresko(diamond).depositCollateral(account, collateralAsset, amount)`, then `IKresko(diamond).mintKreskoAsset(account, krAsset, amount, receiver)` to mint the synthetic. Each krAsset has a Minimum Collateralization Ratio (MCR, typically 150%+); the global Liquidation Threshold (LT) is enforced across the account's full debt/collateral. Burn with `burnKreskoAsset(...)` to repay, then `withdrawCollateral(...)`. Kresko Assets are rebase-aware (positive/negative index) so balances reflect stock splits and similar corporate actions automatically. Prices are fed via Pyth/Chainlink/RedStone with on-demand updates submitted in the same tx for fresh-price actions — always include the latest price update bytes when minting/burning rebase-sensitive krAssets.
06Gotchas
  • krAssets are NOT recognized securities — minting tracker tokens for stocks (krTSLA, krAAPL) is jurisdiction-restricted; geofence US persons and surface the legal disclaimer.
  • Liquidations are global at the account level — adding a leveraged krAsset position can liquidate unrelated krAsset debt under the same account if the LT is breached; show consolidated health, not per-position health.
  • Oracles are mixed push (Chainlink/RedStone) + on-demand (Pyth) — for on-demand updates the user must submit a fresh price in the same transaction, otherwise the action reverts on staleness.
  • krAssets can rebase down (negative index) on stock-split or governance action — naive UIs that cache balances or use prior `balanceOf` for transfer amounts will under/over-spend.
  • KISS is itself overcollateralized but its peg depends on protocol arbitrage and Curve-style pools; in 2023-2025 several similar synthetic-stables de-pegged briefly under stress — surface the peg explicitly.
  • The org's GitHub is marked '(Shutdown)' style and the original prototype repo is archived; verify which deployment is live (Arbitrum / Optimism) and which Diamond address is current before integrating.
  • Synthetic equity tracker prices use external feeds with TradFi market hours — outside trading hours krStock prices freeze and arbitrage cannot close mispricing; warn users about the freeze window.
07Alternatives