diff --git a/src/pages/guide/_template.mdx b/src/pages/guide/_template.mdx index 282e72b4..dd837205 100644 --- a/src/pages/guide/_template.mdx +++ b/src/pages/guide/_template.mdx @@ -1,3 +1,7 @@ +--- +searchable: false +--- + import { Cards, Card } from 'vocs' import * as Demo from '../../components/guides/Demo.tsx' import * as Step from '../../components/guides/steps' diff --git a/src/pages/guide/use-accounts/fee-sponsorship.mdx b/src/pages/guide/use-accounts/fee-sponsorship.mdx deleted file mode 100644 index 61b48cbf..00000000 --- a/src/pages/guide/use-accounts/fee-sponsorship.mdx +++ /dev/null @@ -1,71 +0,0 @@ -# Fee Sponsorship - -Fee sponsorship enables gasless transactions where applications can subsidize user costs. Users can interact with the blockchain without holding fee tokens. - -This specification describes how one account can pay transaction fees on behalf of another account using the [Tempo Transaction](/protocol/transactions/spec-tempo-transaction) type with the `feePayerSignature` field. - -## How It Works - -The [Tempo Transaction](/protocol/transactions/spec-tempo-transaction) type includes an optional `feePayerSignature` field. When present, this signature authorizes a third party to pay the transaction's gas costs while the original sender executes the transaction logic. - -::::steps -### Sender signs the transaction - -The sender signs the transaction with their private key, signing over a **blank fee token field**. This means the sender delegates the choice of which fee token to use to the fee payer. - -### Fee payer selects and signs - -The fee payer selects which fee token to use, then signs over the transaction. - -### Transaction submission - -The fee token and fee payer signature is added to the transaction using the `feePayerSignature` field and is then submitted. - -### Network validation - -The network validates both signatures and executes the transaction. - -### Transaction Fields - -The TempoTransaction includes: -- Standard EIP-1559 fields (chainId, maxPriorityFeePerGas, maxFeePerGas, gasLimit) -- TempoTransaction-specific fields: `signature`, `nonceKey`, `nonce`, `calls` (batch of calls to execute) -- Optional `feeToken` field to specify which stablecoin pays fees -- Optional `feePayerSignature` field when sponsored -- Optional `validBefore` and `validAfter` for scheduled transactions - -### Dual Signatures - -**Sender signs:** The transaction they want to execute using their preferred signature scheme (secp256k1, P256, or WebAuthn) -**Fee payer signs:** Authorization to pay fees for that specific transaction and sender - -Each signature is recovered independently to determine the sender and fee payer addresses. - -## Validation - -When `feePayerSignature` is present: -1. Both sender and fee payer signatures must be valid -2. Fee payer must have sufficient balance in the fee token -3. Transaction is rejected if either signature fails or fee payer's balance is insufficient - -When `feePayerSignature` is absent: -- Sender pays their own fees (standard behavior) - -:::info -Fee payer information is determined statically from the transaction data, ensuring efficient validation without requiring transaction execution. -::: - -## Execution - -1. Recover both sender and fee payer addresses from their signatures -2. Charge gas fees to the fee payer's balance -3. Execute transaction with sender as the transaction origin -4. Refund unused gas to the fee payer - -## Security - -- Fee payer signature commits to both the transaction details and specific sender -- Prevents signature reuse or unauthorized fee charging -- Replay protection via chain ID and 2D nonce system (nonceKey + nonce) -- Fee payers cannot be drained beyond the transaction's gas limit -- Support for multiple signature schemes (secp256k1, P256, WebAuthn) with automatic detection based on signature length diff --git a/src/pages/protocol/tip20/overview.mdx b/src/pages/protocol/tip20/overview.mdx index cc3e61ac..b3d25a9f 100644 --- a/src/pages/protocol/tip20/overview.mdx +++ b/src/pages/protocol/tip20/overview.mdx @@ -25,7 +25,7 @@ Below are some of the key benefits and features of TIP-20 tokens: /> diff --git a/src/pages/protocol/tips/tip_template.mdx b/src/pages/protocol/tips/_tip_template.mdx similarity index 98% rename from src/pages/protocol/tips/tip_template.mdx rename to src/pages/protocol/tips/_tip_template.mdx index 988b552d..17d966b3 100644 --- a/src/pages/protocol/tips/tip_template.mdx +++ b/src/pages/protocol/tips/_tip_template.mdx @@ -6,6 +6,7 @@ authors: status: Draft | In Review | Approved | In Progress | Devnet | QA/Integration | Testnet | Mainnet | Deprecated related: protocolVersion: +searchable: false --- # TIP-XXXX: TIP Title diff --git a/src/pages/quickstart/tip20.mdx b/src/pages/quickstart/tip20.mdx deleted file mode 100644 index 5565bdf6..00000000 --- a/src/pages/quickstart/tip20.mdx +++ /dev/null @@ -1,115 +0,0 @@ ---- -description: Build with TIP-20, Tempo's native token standard. Pay fees in any stablecoin, enforce transfer policies, and access dedicated payment lanes. ---- - -import { Cards, Card } from 'vocs' - -# Use the TIP-20 Standard - -TIP-20 is Tempo's native token standard for stablecoins and payment tokens. TIP-20 is designed for stablecoin payments, and is the foundation for many token-related functions on Tempo including transaction fees, payment lanes, and optimized routing for DEX liquidity on Tempo. - -All TIP-20 tokens are created by interacting with the [TIP-20 Factory contract](/protocol/tip20/spec#tip20factory), calling the `createToken` function. If you're issuing a stablecoin on Tempo, we **strongly recommend** using the TIP-20 standard. Learn more about the benefits, or follow the guide on issuance [here](/guide/issuance). - -## Benefits & Features of TIP-20 Tokens - -Below are some of the key benefits and features of TIP-20 tokens: - - - - - - - - - - - - -### Pay Fees in Any Stablecoin - -Any USD-denominated TIP-20 token can be used to pay transaction fees on Tempo. - -The [Fee AMM](/protocol/fees/spec-fee-amm) automatically converts your token to the validator's preferred fee token, eliminating the need for users to hold a separate gas token. This feature works natively: no additional infrastructure or integration required. - -Full specification of this feature can be found in the [Payment Lanes Specification](/protocol/blockspace/payment-lane-specification). - -### Get Predictable Payment Fees - -Tempo has dedicated payment lanes: reserved blockspace for payment TIP-20 transactions that other applications cannot consume. Even if there are extremely popular applications on the chain competing for blockspace, payroll runs or customer disbursements execute predictably. Learn more about the [payments lane](/protocol/blockspace/payment-lane-specification). - -### Role-Based Access Control (RBAC) - -TIP-20 includes a built-in [RBAC system](/protocol/tip403/spec#tip-20-token-roles) that separates administrative responsibilities: - -- **ISSUER_ROLE**: Grants permission to mint and burn tokens, enabling controlled token issuance -- **PAUSE_ROLE** / **UNPAUSE_ROLE**: Allows pausing and unpausing token transfers for emergency controls -- **BURN_BLOCKED_ROLE**: Permits burning tokens from blocked addresses (e.g., for compliance actions) - -Roles can be granted, revoked, and delegated without custom contract changes. This enables issuers to separate operational roles (e.g., who can mint) from administrative roles (e.g., who can pause). Learn more in the [TIP-20 specification](/protocol/tip20/spec#roles). - -### TIP-403 Transfer Policies - -TIP-20 tokens integrate with the [TIP-403 Policy Registry](/protocol/tip403/overview) to enforce compliance policies. Each token can reference a policy that controls who can send and receive tokens: - -- **Whitelist policies**: Only addresses in the whitelist can transfer tokens -- **Blacklist policies**: Addresses in the blacklist are blocked from transferring tokens - -Policies can be shared across multiple tokens, enabling consistent compliance enforcement across your token ecosystem. See the [TIP-403 specification](/protocol/tip403/spec) for details. - -### Operational Controls - -TIP-20 tokens can set **supply caps**, which allow you to set a maximum token supply to control issuance. - -TIP-20 tokens also have **pause/unpause** commands, which provide emergency controls to halt transfers when needed. - -### Transfer Memos - -**Transfer memos** enable you to attach 32-byte memos to transfers for payment references, invoice IDs, or transaction notes. - -### Reward Distribution - -TIP-20 supports an opt-in [reward distribution system](/protocol/tip20-rewards/overview) that allows issuers to distribute rewards to token holders. Rewards can be claimed by holders or automatically forwarded to designated recipient addresses. - -### Currency Declaration - -A TIP-20 token can declare a currency identifier (e.g., `"USD"`, `"EUR"`) that identifies the real-world asset backing the token. This enables proper routing and pricing in Tempo's [Stablecoin DEX](/protocol/exchange). USD-denominated TIP-20 tokens can be used to pay transaction fees. diff --git a/vocs.config.ts b/vocs.config.ts index b3b50d1f..89d17ab0 100644 --- a/vocs.config.ts +++ b/vocs.config.ts @@ -672,6 +672,16 @@ export default defineConfig({ source: '/sdk/typescript/prool', destination: '/sdk/typescript/prool/setup', }, + { + source: '/guide/use-accounts/fee-sponsorship', + destination: '/guide/payments/sponsor-user-fees', + status: 301, + }, + { + source: '/quickstart/tip20', + destination: '/protocol/tip20/overview', + status: 301, + }, ], twoslash: { twoslashOptions: {