diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 6ef37cc0..4433ed2c 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -2,17 +2,15 @@ ## [0.4.2](https://github.com/sprintertech/sprinter-sdk/compare/docs-v0.4.1...docs-v0.4.2) (2025-12-02) - ### Bug Fixes -* pointsupdate ([#200](https://github.com/sprintertech/sprinter-sdk/issues/200)) ([2c9ca5c](https://github.com/sprintertech/sprinter-sdk/commit/2c9ca5ceae4a798772b9239bbb19fe4da1efd7b8)) +- pointsupdate ([#200](https://github.com/sprintertech/sprinter-sdk/issues/200)) ([2c9ca5c](https://github.com/sprintertech/sprinter-sdk/commit/2c9ca5ceae4a798772b9239bbb19fe4da1efd7b8)) ## [0.4.1](https://github.com/sprintertech/sprinter-sdk/compare/docs-v0.4.0...docs-v0.4.1) (2025-11-13) - ### Bug Fixes -* adding points to docs ([#197](https://github.com/sprintertech/sprinter-sdk/issues/197)) ([76117ac](https://github.com/sprintertech/sprinter-sdk/commit/76117ac3e6b4c0d1be30ccebaeee6e9538dcfcde)) +- adding points to docs ([#197](https://github.com/sprintertech/sprinter-sdk/issues/197)) ([76117ac](https://github.com/sprintertech/sprinter-sdk/commit/76117ac3e6b4c0d1be30ccebaeee6e9538dcfcde)) ## [0.4.0](https://github.com/sprintertech/sprinter-sdk/compare/docs-v0.3.12...docs-v0.4.0) (2025-11-11) diff --git a/docs/docs/01-introduction/01-introduction.md b/docs/docs/01-introduction/01-introduction.md index 80d1b452..eabb59e5 100644 --- a/docs/docs/01-introduction/01-introduction.md +++ b/docs/docs/01-introduction/01-introduction.md @@ -12,31 +12,23 @@ sidebar_position: 1 # -Sprinter envisions a decentralized, open and equitable financial system that provides opportunities for everyone. Our mission is to build the infrastructure that democratizes access to crosschain liquidity and optimizes liquidity flows across DeFi. +Credit is what gives people agency: the freedom to do more than their current balance allows, to move before the money catches up, to act on their own terms. And increasingly, it is not just people who need that freedom. AI agents can think, plan, and execute, but they cannot borrow, settle, or take financial risk. -# What is Sprinter? +We gave the world intelligence it has never had before, and it still cannot get a decent credit line. The infrastructure has been frozen for 30 years. Rigid terms, expensive rates, one-size-fits-all products for people, zero access for machines. Stablecoins showed what happens when you rebuild financial architecture from scratch: payments became programmable, global, and structurally cheaper overnight. That same transformation is now possible for credit, and almost nobody is building it. This is why Sprinter exists. -Sprinter combines solving-as-a-service infrastructure with credit-based crosschain liquidity. It enables venues to borrow and execute onchain actions without pre-funded inventory, while giving dApps and protocols access to best-in-class execution routes, powered by the Project Blanc advanced solving technology. +## What is Sprinter Stash? -## Sprinter’s Core Products +We are building Stash, a credit engine that apps plug in via a single API and get access to the full credit stack: flexible terms, adaptive guardrails, and economics powered by DeFi. Collateral is productive, meaning the assets backing a credit line generate yield, making credit cheaper by design. Web2 in the front, DeFi in the back. The end user never touches a protocol, they just get credit that is personalised, adaptive, and affordable. -### [Sprinter Stash](Stash) - -Sprinter Stash is a universal credit protocol that powers the next-generation of use cases, from solver credit lines to trading, whilst rewarding LPs with sustainable, risk-managed stablecoin yield. - -Stash provides zero-collateral credit, so solvers don’t need capital, users don’t need to touch bridges, and dApps get instant fills. - -### [Sprinter Solve](Solve) - -A solving-as-a-service platform that offers a request-for-quote (RFQ) based swap API for our partners. It enables dApps, wallets, and protocols to improve execution quality, optimize pricing, and enhance user experience. +Stash powers credit for apps in the onchain economy and beyond. Any app, in any market, whether they are building a fintech, a neobank, an agentic wallet, or something we have not imagined yet, can plug in and offer their users credit that actually works for them. As more people take control of their financial lives, and as autonomous agents enter the economy, the demand for programmable, personalised credit is only going to grow. ## Need to chat to us? If you have questions about Sprinter, the code, the docs, or have a partnership inquiry, please reach out to us on [Telegram](https://t.me/sprinter_tech/1) or via email at [hello@sprinter.tech](mailto:hello@sprinter.tech). -### Join our Community +## Join our Community - **Telegram:** [t.me/sprinter_tech](https://t.me/sprinter_tech) - **X:** [@sprinter_ux](https://x.com/sprinter_ux) -- **Website:** [sprinter.tech](https://sprinter.tech) -- **Blog:** [blog.sprinter.tech](https://blog.sprinter.tech) +- **Website:** [sprinter.tech](https://sprinter.tech/) +- **Blog:** [blog.sprinter.tech](https://blog.sprinter.tech/) diff --git a/docs/docs/02-stash-credit-v2/01-credit-engine.md b/docs/docs/02-stash-credit-v2/01-credit-engine.md new file mode 100644 index 00000000..a98abfcc --- /dev/null +++ b/docs/docs/02-stash-credit-v2/01-credit-engine.md @@ -0,0 +1,79 @@ +--- +id: credit-engine +title: Credit Engine +sidebar_position: 1 +--- + +# Credit Engine + +## Introduction + +The Stash Credit Engine handles credit line creation, drawdowns, repayments, and liquidations. Key features include: + +**Flexible terms** — Overcollateralized or undercollateralized, fixed-rate or variable, short-term or rolling. The credit parameters adapt to the use case, not the other way around. + +**Cross-chain portfolio, one credit line** — Collateral assets across all major chains valued as a unified portfolio. $50K staked ETH on Ethereum + $30K in Morpho Earn on Base + $20K WBTC on Arbitrum → $70K credit line, usable anywhere without bridging. + +**Productive collateral** — Integrations with leading DeFi strategists Gauntlet and YO provide market-leading yield on your collateral assets such as USDC, ETH & BTC. + +## Credit Configurations + +Stash uses credit configurations to structure different forms of credit. Creating a new credit configuration is currently a permissioned process — if you need purpose-fit credit for your app, we'd love to hear from you! + +| | Card Spend | Crosschain Intents | +| ----------------- | ----------------------- | -------------------------------------------- | +| Access | Permissionless | Permissioned | +| Type | Overcollateralized | Zero Collateral | +| Usage Constraints | No | Fills in supported Intent protocols | +| Credit Chains | Base | Base, Arbitrum, Ethereum, Optimism, Unichain | +| Credit Asset | USDC | USDC, WETH, WBTC | +| Collateral Chains | Base, Ethereum | N/A | +| Collateral Assets | All supported | N/A | +| Term | Fixed 30+7 | Up to 4 hours | +| Fees | One-Time + Late Payment | Dynamic | + +## Credit Issuance + +Stash currently uses USDC as the main asset for credit issuance. + +## Supported Assets & Positions + +Stash provides one unified credit line — and in the case of collateralized credit, users can deposit assets and DeFi positions across all supported chains. + +## Position Health, LTVs and Liquidations + +Stash constantly monitors the health of all credit positions according to the defined credit configuration. In the case of collateralized credit, the collateral value is tracked continuously for changes. + +**Loan-to-Value (LTV)** + +LTV defines how much credit a user can draw relative to the value of their collateral. Each supported collateral asset has its own LTV ratio, reflecting its risk profile. + +`Max Credit = Collateral Value × LTV` + +For example, if a user deposits $1,000 of USDC collateral with an LTV of 80%, their maximum credit line is $800. + +**Maintenance LTV** + +Maintenance LTV is the maximum LTV a position is allowed to reach while there is an outstanding balance. It is set higher than the initial LTV to provide a safety buffer before liquidation becomes possible. + +`Current LTV = Outstanding Debt / Collateral Value` + +As long as the Current LTV stays below the Maintenance LTV, the position is safe. If collateral value drops or debt grows (due to accruing interest) and pushes the Current LTV above the Maintenance LTV, the position becomes eligible for liquidation. + +**Position Health Factor** + +The Health Factor combines both values into a single number that indicates how close a position is to liquidation: + +`Health Factor = (Collateral Value × Maintenance LTV) / Outstanding Debt` + +| Health Factor | Status | +| ------------- | ------------------------------------------------ | +| > 1.3 | Healthy | +| 1.0 – 1.3 | At risk — consider adding collateral or repaying | +| < 1.0 | Eligible for liquidation | + +A Health Factor above 1.0 means the position is safe. Below 1.0, the protocol can liquidate part of the collateral to restore a healthy position. + +**Liquidations** + +When a position becomes eligible for liquidation, Stash liquidates only as much collateral as needed to bring the Health Factor back above 1.0 — partial liquidations wherever possible. Liquidators who perform the liquidation receive a 5% bonus on the collateral they claim. diff --git a/docs/docs/02-stash-credit-v2/02-policy-engine.md b/docs/docs/02-stash-credit-v2/02-policy-engine.md new file mode 100644 index 00000000..43e08762 --- /dev/null +++ b/docs/docs/02-stash-credit-v2/02-policy-engine.md @@ -0,0 +1,25 @@ +--- +id: policy-engine +title: Policy Engine +sidebar_position: 2 +--- + +# Policy Engine + +The Policy Engine is what makes Stash credit _configurable_. Rather than one-size-fits-all credit, every credit line is governed by a policy that defines exactly who can use it, what they can do with it, and under what conditions. + +The tighter the constraints, the less collateral is needed — because the protocol's downside risk is bounded. This is how Stash can offer favourable or even undercollateralised credit terms: not because the risk disappears, but because it is constrained. + +## Components + +**Credit Operators** + +Credit operators enable Stash users to grant access to their Stash credit line to other users or agents. Furthermore it allows to define fine-grained policy on the credit access provided such as: + +- _Actions_ — which Stash actions such as draw, repay and withdraw collateral are allowed +- _Amount caps_ — per-transaction and per-period limits +- _Co-sign requirements_ — actions above a value threshold require an additional approval + +**Guardrailed Credit Accounts** + +Stash supports the creation of guardrailed credit accounts that grant Stash permissions on the issued funds. diff --git a/docs/docs/02-stash-credit-v2/index.md b/docs/docs/02-stash-credit-v2/index.md new file mode 100644 index 00000000..1f2935b8 --- /dev/null +++ b/docs/docs/02-stash-credit-v2/index.md @@ -0,0 +1,26 @@ +--- +id: stash-credit-v2 +title: Stash Credit +sidebar_position: 2 +--- + +# Stash Credit + +Stash is a programmable credit layer for individuals and agents. We don't just issue credit — we make credit _configurable_. + +The first version of Stash (V1) provided zero-collateral credit for crosschain solvers and processed over $200m USD in volume within the first months. With our upcoming V2 we take credit beyond solvers and bring the benefits of _programmable credit_ to neo finance and the agentic age. + +On a high-level, Stash (V2) consists of the following components: + +1. **Credit Hub** + The core credit issuance and management system. Handles credit line creation, drawdowns, repayments, and liquidations across supported networks. +2. **Policy Engine** + Credit policies enable Stash to 1) provide favorable credit conditions and 2) enable users and applications to constrain usage of credit. +3. **Liquidity Layer** + The Stash Liquidity Layer provides the liquidity required for the credit engine. The Stash Liquidity Hub & App allow Liquidity Providers to earn yield by providing capital. + +Stash enables applications to get purpose-fit credit lines for their users: + +- Card Programmes fund card spend just-in-time, so users don't have to hold assets idle +- Neobanks provide a DeFi-powered liquid savings account, so users can spend their assets while having them earn yield in DeFi +- Agents access a human-delegated undercollateralized credit line to trade extended leverage on Hyperliquid diff --git a/docs/docs/03-Solve/02-solve-quick-start.md b/docs/docs/03-Solve/02-solve-quick-start.md deleted file mode 100644 index f0c4badb..00000000 --- a/docs/docs/03-Solve/02-solve-quick-start.md +++ /dev/null @@ -1,119 +0,0 @@ ---- -id: solve-api-quick-start -title: Solve API Quick Start -sidebar_position: 110 ---- - -:::tip -Request your Solve API key to start your integration via [Sprinter Solve Request](https://forms.gle/TCAUwcYqguQbWi3bA) or contacting support@sprinter.tech -::: - -Sprinter Solve enables your dApp, aggregator or protocol integration to **optimize swap execution via intent fulfillment**. - -This guide covers: - -1. Recap of the [Sprinter Solve Lifecycle](#1-solve-lifecycle) -2. Geting the [finalized route and call data execution package](#2-geting-the-finalized-route-and-call-data-execution-package) -3. Send transaction using [`swap_call_data`](#3-send-transaction-using-swap_call_data) -4. Sprinter Solve [Execution Tips](#4-sprinter-solve-execution-tips) - -## 1. Solve Lifecycle - -
- -```mermaid -flowchart TD - A[Intent Detected] --> - E[Get the finalized route and call data execution package] - E --> F[Simulate & Execute Transaction] - F --> G[Send Transaction & Finalize Fill] - - - -click E "solve-get-route-v1" "Borrow Quote" -style E fill:#FF9B43,stroke:#333,stroke-width:2px,color:#000,font-weight:bold - -``` - -
- -## 2. Geting the finalized route and call data execution package - -Calling the [**Get Route API**](solve-get-route-v1) returns the finalized route, including call data, gas estimates and token out amounts. Use this executable call data `swap_call_data` after verifying a quote. - -- **Mainnet:** `https://swaps.sprinter.tech/mainnet` -- **Base:** `https://swaps.sprinter.tech/base` - -```ts title="Example Fetch Quote Request Payload" -const AMOUNT_IN = "100000000"; // the amount of token you want to exchange, in its smallest unit (as a string) -const TOKEN_IN_ADDRESS = "0x..."; // address of the token you want to sell -const TOKEN_OUT_ADDRESS = "0x..."; // address of the token you want to buy -const SLIPPAGE_BPS = 50; // slippage in basis points (e.g., 50 = 0.5%) -const API_USER = "your_api_user"; -const API_PASS = "your_api_pass"; - -const fetchRoute = async () => { - const url = `https://swaps.sprinter.tech/mainnet/v1/route?amountIn=${AMOUNT_IN}&tokenIn=${TOKEN_IN_ADDRESS}&tokenOut=${TOKEN_OUT_ADDRESS}&slippageBps=${SLIPPAGE_BPS}`; - - const response = await fetch(url, { - method: "GET", - headers: { - Authorization: "Basic " + btoa(`${API_USER}:${API_PASS}`), - }, - }); - - const data = await response.json(); - return data; -}; -``` - -## 3. Send transaction using `swap_call_data` - -Once you've received a valid route from `/v1/route`, you'll use the `swap_call_data` in a transaction to execute the intent on-chain. - -Below is a simplified example using `ethers.js` to send the transaction from a connected signer: - -```ts title="Example Execute Route Payload" -import { ethers } from "ethers"; - -const provider = new ethers.JsonRpcProvider("https://mainnet.base.org"); // or OP/Arbitrum -const signer = new ethers.Wallet("", provider); - -const routeResponse = await fetch("https://swaps.sprinter.tech/base/1/route", { - method: "POST", - headers: { - "Content-Type": "application/json", - "X-API-Key": "", - }, - body: JSON.stringify({ - fromToken: "USDC", - toToken: "ETH", - amount: "1000000", - fromChainId: 8453, - toChainId: 1, - intentType: "swap", - }), -}); - -const route = await routeResponse.json(); - -// Send the calldata to the target contract (Sprinter Router or intent receiver) -const tx = await signer.sendTransaction({ - to: route.to, // the router or intent execution contract eg. 0xbfc4b3546416c5a7fa857bdb31b7701bfc7a42f7 for Sprinter Solve (Mainnet, Base) - data: route.swap_call_data, - value: route.value || 0, // only include if route requires native gas - gasLimit: route.gasEstimate + 50000, // add buffer -}); - -console.log("Transaction hash:", tx.hash); -``` - -## 4. Sprinter Solve Execution Tips - -1. Use tools like Tenderly or hardhat to **simulate calldata before execution**. - -2. **Pay attention to slippage** - Quotes expire quickly. Re-query /route before execution if delayed. - -3. Use **gasEstimate for accurate costing** - whilst the Route API provides gas estimates — apply buffer when setting gas limits. - -4. **Handling Rate Limits** - If you hit 429s, give it a moment and retry using retry_after value. You can request higher limits via support@sprinter.tech. diff --git a/docs/docs/03-Solve/get-route-v-1.api.mdx b/docs/docs/03-Solve/get-route-v-1.api.mdx deleted file mode 100644 index 9903b0ce..00000000 --- a/docs/docs/03-Solve/get-route-v-1.api.mdx +++ /dev/null @@ -1,355 +0,0 @@ ---- -id: solve-get-route-v1 -title: "Get Route V1 API" -description: "Calculate the optimal swap route and generate execution parameters for a token exchange" -sidebar_label: "Get Route API V1 " -hide_title: true -hide_table_of_contents: true -api: eJztWEtvGzcQ/isEkaJOu5bWrn2obnLitj60DeykF0MFRtyRlskuuSaHilRh/3sx5OplKc4LAVI3N4mcnfnmmwfJWUrboAPS1lwVciCnSNc2EP51IjNZoFdON7wpB/IZVCpUQCioRGEb0jVUwr+FRjj+RIApxBQNq0OBc1SBvxQNOKiR0HkxsU6AIPsGjcC5KsFMUWZyIyEHt0up2dpdQLeQmTRQoxxIqG0wdGX2UL0sUaRNYSdCmyZQMuAF2YTuSJu09L0XvoaqQk8iGE1PZSa9KrEGOVje0ztc6wQjLq+fneYdbvACRIEqeU9Om6k4MlZ4pdGQnmgljKXIKOunRcP4k2D0lQgdW/j7Nj/+efTjExbSVLHUS7aQLMs2kw7vgnZYyAG5gG12mJoI6wAzz6whB4oEFIVD79kXjtwWR5EirKoHeLikEh2GWqj76o5OczFeEPqnAo2yBRbMTYlzWLHzVlMp8rloHE70/GEy8vktHE+Gx78wKcuzvN3mZZhMfiQnfwb6YFJsoB1WxmHx6EjxlW4amOJF4w+W0WpfkK3QgVGcK2IMXnvRWG3IiyPsTXuZOM9jKee98+92a6jzRRvCKTqZyYl1NVBa+ulUZrLWRtehloM8kzXM0++TPM9zhjSBUJEcnOc7Tk2g8tiOeMk31nj0bOs0z/cjcxOUQu8noaoWQq06VrHdpmIANu2pQAJdMSMlQhF70FJe411AT8dXz/dNvDL6LqBwSUToIpV9dHePiXVU10SUOH8oyKdn7RPZtm0mObfQECuDpqm0ij2l/9oziuU7c3OXAYfR/fd43oG149eouGY21N92nTfVUq277pT+Ergp8g8FVfUcCOQok43jE4V0CtLm66+yw+449FUi7Dj+6lvQOgX2kP6G8zUQliqAILYP7rtclx8B4Idt6xfspORSWa10V5frrk1wHbWZPDvUKC6gWJdwEbjnCW1mUOli68LyaJrCpXPWiVX7TAnwYeXPcZOZRFawX95x9x3WeE9oU0SMZhrDzZa4npK67P550a4MvUNljd5DvDLuMrmdA1FyHfmTQ6GCQKV1+h+ujNgs72cAm9LeM2rlMMYSHtER8b/NhrN9VX9YMdMwrnD7ijCxwRTrHjXVMzTfusKjyYPzQ+fBlWGS+ThHN0O3xvIt0v/ZSPP9Dqm03VwjEVzKgezPTvqx0Dk4Mdxp8BBcxbEgavyg3+d+4Hu+cYzO9QhV2a9BG4P7z8rf07q44R4yfHEl+Q32fnVj8Lin6wI8bikaMUYVnKZFBHkBXqthYEduR9u7Nxz7FJYtmXXSMY5VMvJ/ftepyJw2ExsFOwaj7fFCXFRg1B684YsrETwWa4mIVWaSaUwiJ728lx+PkYAj2lhPNcT07B6iUyQRr2pif8y03KT4F5w4dZwQzqnfVKANA43xWnZJcitnjC2lySiTpfXEq8slB+2Vq9qWl9MTm+NSaM/HyOq5+oBbR9ddfT0Vnzu9OujHG1zsTsxmUAUWi1n5STg/bpb0AKrNsOrLgTo8y3kfqPSk/URUnzU+eQDZ7shmA27Ef1y8t8Q2sDqnYiamT4dKYbPt0t55wVrWDfLXy5eybf8FfAyYow== -sidebar_class_name: "get api-method" -info_path: ../src/api/generated/solve/swap-by-blanc -custom_edit_url: null ---- - -import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; -import ParamsDetails from "@theme/ParamsDetails"; -import RequestSchema from "@theme/RequestSchema"; -import StatusCodes from "@theme/StatusCodes"; -import OperationTabs from "@theme/OperationTabs"; -import TabItem from "@theme/TabItem"; -import Heading from "@theme/Heading"; - - - - - -Calculate the optimal swap route and generate execution parameters for a token exchange - - - - - - - - diff --git a/docs/docs/03-Solve/index.md b/docs/docs/03-Solve/index.md deleted file mode 100644 index 2a5bbfd6..00000000 --- a/docs/docs/03-Solve/index.md +++ /dev/null @@ -1,76 +0,0 @@ ---- -id: Solve -title: Sprinter Solve ---- - -:::tip -Ready to start your **Solve integration**? Check out the [Solve API quick start guide](solve-api-quick-start) -::: - -# Sprinter Solve - -Sprinter Solve enables the efficient execution of intent-based Swaps through its Solve API (RFQ and Swap), powered by the Sprinter Solver, built on top of the Project Blanc solver. It provides: - -- **Best Price:** Finds optimal routes and prices with MEV protection and low slippage. -- **Fast Integration:** Dedicated API that can be integrated in hours. -- **Crosschain Liquidity:** Leverages Sprinter Stash for real-time liquidity allocation. -- **Zero Collateral:** Solvers execute transactions without upfront capital. -- **Support:** 24/7 support with flexible SLAs. - -## How Solve Works - -```mermaid -flowchart TD - A[Intent Detected] --> - E[Get the finalized route and call data execution package] - E --> F[Simulate & Execute Transaction] - F --> G[Send Transaction & Finalize Fill] - - -click E "solve-get-route-v1" "Borrow Quote" -style E fill:#FF9B43,stroke:#333,stroke-width:2px,color:#000,font-weight:bold - -``` - -## Key Features & Utility - -### For dApps & Wallets - -dApps and wallets can easily interface with the Solve API to: - -- Enable seamless swaps and crosschain execution for users. -- Improve transaction reliability and reduce slippage. -- Integrate directly with the Solver API for superior UX. - -### For Intent-Based Protocols - -Seamlessly integrate our solver into intent-based protocols for: - -- Best-In-class intent execution for your protocol across swaps, crosschain and complex Intents -- Improve fulfillment rates across chains. -- Fast Solver onboarding via dedicated protocol integration or ERC-7683 compliant interface -- Day 1 support for new protocol launches - -Feel free to contact us at hello@sprinter.tech to see how we can help your intent protocol. - -## Solve Fees - -When a fixed user fee is applied through Sprinter API, revenue is shared with partners based on usage volume. - -### Fee Discount Tiers - -| Monthly Volume (USD) | Sprinter Fee (X%) | Discount | -| -------------------- | ----------------- | -------- | -| $0 - $1M | X \* 0.20 | 0% | -| $1M - $10M | X \* 0.15 | 25% | -| $10M - $50M | X \* 0.10 | 50% | -| $50M - $100M | X \* 0.075 | 62.5% | -| Over $100M | X \* 0.05 | 75% | - -### Example - -``` -User Fee = 0.875% -Monthly Volume = $150M -Sprinter Fee = 0.875% * 0.05 = 0.04375% (4.375 bps) -``` diff --git a/docs/docs/02-Stash/01-utilizing-stash.md b/docs/docs/03-Stash/01-utilizing-stash.md similarity index 100% rename from docs/docs/02-Stash/01-utilizing-stash.md rename to docs/docs/03-Stash/01-utilizing-stash.md diff --git a/docs/docs/02-Stash/02-stash-contracts.md b/docs/docs/03-Stash/02-stash-contracts.md similarity index 100% rename from docs/docs/02-Stash/02-stash-contracts.md rename to docs/docs/03-Stash/02-stash-contracts.md diff --git a/docs/docs/02-Stash/03-get-the-borrow-quote-for-a-liquidity-transaction-based-on-the-input-data.api.mdx b/docs/docs/03-Stash/03-get-the-borrow-quote-for-a-liquidity-transaction-based-on-the-input-data.api.mdx similarity index 100% rename from docs/docs/02-Stash/03-get-the-borrow-quote-for-a-liquidity-transaction-based-on-the-input-data.api.mdx rename to docs/docs/03-Stash/03-get-the-borrow-quote-for-a-liquidity-transaction-based-on-the-input-data.api.mdx diff --git a/docs/docs/02-Stash/04-get-the-borrow-cost-for-a-liquidity-transaction.api.mdx b/docs/docs/03-Stash/04-get-the-borrow-cost-for-a-liquidity-transaction.api.mdx similarity index 100% rename from docs/docs/02-Stash/04-get-the-borrow-cost-for-a-liquidity-transaction.api.mdx rename to docs/docs/03-Stash/04-get-the-borrow-cost-for-a-liquidity-transaction.api.mdx diff --git a/docs/docs/02-Stash/index.md b/docs/docs/03-Stash/index.md similarity index 99% rename from docs/docs/02-Stash/index.md rename to docs/docs/03-Stash/index.md index 4b170cad..399fc4f0 100644 --- a/docs/docs/02-Stash/index.md +++ b/docs/docs/03-Stash/index.md @@ -1,6 +1,6 @@ --- id: Stash -title: Sprinter Stash +title: Stash Solver Credit (V1) sidebar_position: 3 --- diff --git a/docs/docs/09 -Resources/02-glossary.md b/docs/docs/09 -Resources/02-glossary.md index e27c9360..0c885846 100644 --- a/docs/docs/09 -Resources/02-glossary.md +++ b/docs/docs/09 -Resources/02-glossary.md @@ -4,134 +4,106 @@ title: Sprinter Glossary sidebar_position: 12 --- -### Account Abstraction (AA) - -A design that moves away from traditional externally owned accounts (EOAs) and allows more flexible wallet interactions. - ### Bridges Protocols that facilitate asset and data transfer between different blockchain networks. Bridges can be trust-minimized (e.g., ZK-proofs, MPC) or centralized. -### Crosschain Finality +### Collateral -Ensuring that transactions on one blockchain are finalized and verifiable on another without rollback risks. +Assets deposited by a user to secure a credit line. Stash values collateral across all supported chains as a single unified portfolio. -### Crosschain Governance +### Credit Account -Systems that enable decentralized governance across multiple chains without requiring users to vote on each network separately. +A guardrailed smart contract that holds issued credit funds and enforces usage constraints defined by the credit policy. -### Crosschain Messaging +### Credit Configuration -A communication layer that enables smart contracts and applications on different blockchains to exchange messages and trigger actions. +The financial terms governing a credit line: supported collateral assets, LTV ratios, credit asset, interest rate, term length, and fees. A tighter credit policy can unlock a more favourable configuration. -### Decentralized Order Flow +### Credit Hub -A distributed mechanism where the process is open, permissionless, and avoids reliance on a central entity (such as a centralized exchange) +The core component of Stash V2. Handles credit line creation, drawdowns, repayments, and liquidations across supported networks. -### Execution Environments +### Credit Line -Different blockchain execution layers (e.g., EVM, WASM) that need to be abstracted for smooth multi-chain interactions. +A pre-approved borrowing facility issued by Stash, allowing users or agents to draw funds up to a defined limit based on their collateral and credit configuration. -### Executable Intents +### Credit Operator -Intents that include conditions and constraints to ensure execution only happens when all state change criteria are met. +An entity (user, app, or agent) granted access to a Stash credit line on behalf of its owner, subject to fine-grained policy constraints such as allowed actions, amount caps, and co-sign requirements. -### Fair Ordering Protocols +### Drawdown -Systems that prevent MEV extraction and ensure user transactions are processed fairly in intent-based architectures. +The act of drawing funds from an open credit line up to the available credit limit. ### Fill -A fill represents the full lifecycle: Detecting a user intent ➔ Borrowing liquidity ➔ Executing the transaction ➔ Repaying liquidity ➔ Realizing solver and protocol profits. +A fill represents the full lifecycle: Detecting a user intent → Borrowing liquidity → Executing the transaction → Repaying liquidity → Realizing solver and protocol profits. -### Gas Abstraction +### Health Factor -A mechanism where users don’t need to hold native tokens to pay for gas fees, allowing transactions to be executed with alternative assets. +A single number indicating how close a position is to liquidation, calculated as `(Collateral Value × Maintenance LTV) / Outstanding Debt`. A Health Factor above 1.0 is safe; below 1.0 the position is eligible for liquidation. -### Intent Aggregation +### Intent Systems -The process of bundling multiple user intents to optimize execution costs and efficiency. +A model where users specify desired outcomes, and solvers or order flow networks execute transactions accordingly. -### Intent Standardization +### Interop -The process of creating common formats for intent expression so that multiple solvers can compete on execution. +The ability of multiple blockchain networks to communicate and share information in a seamless, trust-minimized, and permissionless way. This enables assets, smart contracts, and transactions to interact across chains without requiring users to manage complex bridging processes. -### Intent Systems +### Liquidation -A model where users specify desired outcomes, and solvers or order flow networks execute transactions accordingly. +When a position's Health Factor drops below 1.0, Stash liquidates as much collateral as needed to restore a healthy position. Partial liquidations are preferred. Liquidators receive a 5% bonus on the collateral they claim. -### Intent-Based Arbitrage +### Liquidity Layer -Arbitrage that is facilitated through intents, allowing solvers or execution agents to optimize price discrepancies across multiple venues or chains without needing the user to manually define trade paths. +The Stash component that sources and manages the capital required for credit issuance. Liquidity Providers deposit into the Liquidity Hub to earn yield. -### Interop +### Liquidity Provider -The ability of multiple blockchain networks to communicate and share information in a seamless, trust-minimized, and permissionless way. This enables assets, smart contracts, and transactions to interact across chains without requiring users to manage complex bridging processes. +A participant who supplies capital to the Stash Liquidity Layer in exchange for yield. -### Liquidity Mining +### Loan-to-Value (LTV) -Incentivizing users to provide liquidity to decentralized protocols, crucial for ensuring deep liquidity in interoperable ecosystems. +The ratio of a user's credit limit to the value of their collateral. Each supported collateral asset has its own LTV ratio reflecting its risk profile. `Max Credit = Collateral Value × LTV` -### MEV (Maximal Extractable Value) +### Maintenance LTV -The value miners, validators, or solvers can extract by reordering transactions, with growing importance in MEV-resistant routing across chains. +The maximum LTV a position may reach before becoming eligible for liquidation. Set above the initial LTV to provide a safety buffer. `Current LTV = Outstanding Debt / Collateral Value` -### Order Flow Auctions +### MEV (Maximal Extractable Value) -A mechanism where solvers compete to execute user intents by offering the most efficient execution path. +The value miners, validators, or solvers can extract by reordering transactions, with growing importance in MEV-resistant routing across chains. -### Recursive SNARKs +### Overcollateralized Credit -A cryptographic method for verifying multiple proofs efficiently, often used for crosschain validation. +A credit line where the value of deposited collateral exceeds the credit issued, reducing lender risk. -### Solver Competition +### Policy Engine -A model where multiple solvers bid to execute a user’s intent based on optimal execution parameters. +The Stash component that makes credit configurable. Every credit line is governed by a policy defining who can use it, what they can do with it, and under what conditions. Tighter constraints enable more favourable credit terms. -### Solver Networks +### Productive Collateral -Decentralized networks of solvers that execute user intents efficiently while minimizing costs and MEV risks. +Collateral assets that continue to generate yield while locked in Stash, making credit cheaper by design. Stash integrates with DeFi strategies from Gauntlet and YO for this purpose. ### Solvers -Automated agents that find and execute the most efficient way to fulfill a user’s intent, optimizing for cost, speed, and security. - -### Sprinter Solve Route - -Gets the finalized execution package returned by `/v2/route` which contains all necessary data to execute a transaction. It builds on a quote by including calldata, selected liquidity paths, slippage tolerances, and chain-specific details. Routes are consumed directly by solvers or smart contracts to simulate and execute cross-chain swaps or intent fills. +Automated agents that find and execute the most efficient way to fulfill a user's intent, optimizing for cost, speed, and security. ### Stash Borrow Quote -A borrow quote is the preliminary **estimated fee** a solver would incur to borrow credit from Sprinter Stash. It is returned off-chain via the Stash API and helps solvers determine if pursuing a fill is profitable. Borrow quote includes expected gas, risk premiums, protocol fees, and capital access costs — but it is not a binding or reserved price. +A borrow quote is the preliminary estimated fee a solver would incur to borrow credit from Sprinter Stash. It is returned off-chain via the Stash API and helps solvers determine if pursuing a fill is profitable. Borrow quote includes expected gas, risk premiums, protocol fees, and capital access costs — but it is not a binding or reserved price. ### Stash Borrow Cost -A borrow cost is the final, **authorized borrowing offer** issued by Sprinter Stash when a solver decides to proceed with a fill. It reserves credit under specific conditions, allowing solvers to confidently execute the crosschain transaction. - -### State Proofs - -Cryptographic proofs that verify the state of one blockchain on another without needing a centralized validator. +A borrow cost is the final, authorized borrowing offer issued by Sprinter Stash when a solver decides to proceed with a fill. It reserves credit under specific conditions, allowing solvers to confidently execute the crosschain transaction. ### Swaps Asset exchanges that can occur within a single chain or across multiple chains using interoperability protocols. -### Threshold Signature Scheme (TSS) - -A security mechanism where multiple signatures are required to execute a transaction across chains. - -### Threshold Signatures (TSS) - -A cryptographic scheme used in cross transactions to prevent single points of failure. - -### Trust-Minimized Interoperability - -A security model that ensures crosschain transactions can be verified without relying on a single centralized authority. - -### Unified Liquidity Pools - -Crosschain pools that allow users to access liquidity seamlessly without needing to bridge assets manually. - -### Universal Smart Accounts +### Undercollateralized Credit -Wallet accounts that function across multiple blockchains and support advanced execution logic. +A credit line where the issued credit exceeds the value of deposited collateral (or requires no collateral at all). Enabled by tight usage constraints via the Policy Engine. diff --git a/docs/docusaurus.config.ts b/docs/docusaurus.config.ts index 9441552e..8b4939e2 100644 --- a/docs/docusaurus.config.ts +++ b/docs/docusaurus.config.ts @@ -50,9 +50,9 @@ const config: Config = { theme: { light: "neutral", dark: "dark" }, }, colorMode: { - defaultMode: "dark", + defaultMode: "light", disableSwitch: false, // optional: hide theme toggle switch - respectPrefersColorScheme: false, // always force dark unless user switches + respectPrefersColorScheme: false, // always force light unless user switches }, navbar: { title: "Sprinter", diff --git a/docs/src/css/custom.css b/docs/src/css/custom.css index 49978564..475351ff 100644 --- a/docs/src/css/custom.css +++ b/docs/src/css/custom.css @@ -9,26 +9,26 @@ @import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700&display=swap"); :root { - --ifm-color-primary: #ff9b43; - --ifm-color-primary-dark: #ff9b43; - --ifm-color-primary-darker: #ff9b43; - --ifm-color-primary-darkest: #ff9b43; - --ifm-color-primary-light: #ff9b43; - --ifm-color-primary-lighter: #ff9b43; - --ifm-color-primary-lightest: #ff9b43; + --ifm-color-primary: #ff5100; + --ifm-color-primary-dark: #ff5100; + --ifm-color-primary-darker: #ff5100; + --ifm-color-primary-darkest: #ff5100; + --ifm-color-primary-light: #ff5100; + --ifm-color-primary-lighter: #ff5100; + --ifm-color-primary-lightest: #ff5100; --ifm-code-font-size: 95%; --docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.1); } /* For readability concerns, you should choose a lighter palette in dark mode. */ [data-theme="dark"] { - --ifm-color-primary: #ff9b43; - --ifm-color-primary-dark: #ff9b43; - --ifm-color-primary-darker: #ff9b43; - --ifm-color-primary-darkest: #ff9b43; - --ifm-color-primary-light: #ff9b43; - --ifm-color-primary-lighter: #ff9b43; - --ifm-color-primary-lightest: #ff9b43; + --ifm-color-primary: #ff5100; + --ifm-color-primary-dark: #ff5100; + --ifm-color-primary-darker: #ff5100; + --ifm-color-primary-darkest: #ff5100; + --ifm-color-primary-light: #ff5100; + --ifm-color-primary-lighter: #ff5100; + --ifm-color-primary-lightest: #ff5100; --docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.3); } @@ -94,16 +94,16 @@ body { /* Custom Tip Box (:::tip) */ .alert--success { - background-color: #262627; /* Tip background color */ - color: #f4f6f9; /* Tip text color */ - border-left: 4px solid #ff9b43; /* Tip border color */ + background-color: #fff7f4; /* Tip background color */ + color: #1a1a1a; /* Tip text color */ + border-left: 4px solid #ff5100; /* Tip border color */ } /* Optional: Adjust icon */ .alert--success .alert__icon { - color: #ff9b43; /* Tip icon color */ + color: #ff5100; /* Tip icon color */ } /* Style links inside TIP boxes */ .alert--success a { - color: #ff9b43; /* Your link color inside tip */ + color: #ff5100; /* Your link color inside tip */ text-decoration: underline; } diff --git a/docs/static/img/credit header.png b/docs/static/img/credit header.png index 46e78a47..be9d6436 100644 Binary files a/docs/static/img/credit header.png and b/docs/static/img/credit header.png differ diff --git a/docs/static/img/sprinter-logo-white.svg b/docs/static/img/sprinter-logo-white.svg index b67b1ee5..25fe4a4d 100644 --- a/docs/static/img/sprinter-logo-white.svg +++ b/docs/static/img/sprinter-logo-white.svg @@ -1,118 +1,14 @@ - - - - - - + + + + + + + + + + + + diff --git a/docs/static/img/sprinter-logo.svg b/docs/static/img/sprinter-logo.svg index e8efddc6..4b2684b9 100644 --- a/docs/static/img/sprinter-logo.svg +++ b/docs/static/img/sprinter-logo.svg @@ -1,173 +1,3 @@ - - - - - - - + + diff --git a/docs/static/img/sprinter.ico b/docs/static/img/sprinter.ico index 24b9f8c7..43ad4bdc 100644 Binary files a/docs/static/img/sprinter.ico and b/docs/static/img/sprinter.ico differ