Protocol
Satoshi Perps v1 Protocol Overview
Last updated
Satoshi Perps v1 Protocol Overview
Last updated
Satoshi Perps is a protocol designed to bring Bitcoin-backed perpetual contracts to the Core blockchain. Its mission is to enhance capital efficiency for Bitcoin holders while maintaining their exposure to BTC. Satoshi Perps achieves this by:
Enabling Bitcoin holders to earn yields on their BTC without losing directional exposure.
Facilitating on-chain perpetual trading using Bitcoin-based assets as collateral.
Providing simplified and scalable liquidity through Bitcoin-denominated liquidity pools.
These are achieved through a sophisticated system architecture comprising five core components:
Vault
Routers
Price Feeds
$SAT Satoshi App Token
SLP
Each of these components plays a crucial role in creating a seamless, secure, and efficient trading environment. Let’s delve into each component in detail.
The Vault contract is the cornerstone of the Satoshi Perps protocol, managing deposits, withdrawals, and trading functions. It’s designed to handle complex operations while maintaining high security standards. Key features and operations:
Users can deposit Bitcoin-based tokens (e.g., WBTC, coreBTC) into the Vault to mint SLP-BTC tokens. For example, if the price of SLP-BTC is 1.50 BTC, a user can mint 1 SLP-BTC by depositing 1.50 WBTC tokens. This process increases the liquidity in the protocol and allows users to start earning yields on their Bitcoin holdings.
SLP tokens can be burned to withdraw the underlying assets. Following the previous example, if the price of SLP-BTC remains at 1.50 BTC, a user can burn 1 SLP-BTC to redeem 1.50 WBTC tokens. This ensures that users can exit their positions and reclaim their assets when needed.
The Vault supports both long and short positions using Bitcoin-based assets as collateral. Here’s how it works:
Longing: A user can open a long position by depositing Bitcoin-based tokens. For example, a user might deposit 1 WBTC (worth $50,000) into the Vault and open a position of 5 BTC (worth $250,000). This would be a 5x leveraged long position. If the price of BTC increases by 10%, the user would make a profit of 5 BTC * 10% = 0.5 BTC (or $25,000 at the original price).
Shorting: A user can open a short position using Bitcoin-based assets as collateral. A user might deposit 1 WBTC and open a short position of 5 BTC. This unique feature allows traders to maintain their Bitcoin exposure even when betting on price decreases.
Liquidations: To maintain system solvency, positions can be liquidated by keepers if losses reduce the collateral to the point where position size / remaining collateral exceeds the maximum allowed leverage. This process is automated to ensure the stability of the protocol.
The Router contracts in Satoshi Perps provide essential convenience functions that simplify user interactions with the Vault. These include:
Handling token transfers to the Vault
Managing the wrapping and unwrapping of native tokens
Implementing a sophisticated two-part transaction process for position changes
The PositionRouter contract is particularly crucial in mitigating front-running issues. It employs a two-step process for increasing or decreasing positions:
A user sends a request to increase/decrease a position to the PositionRouter.
A keeper fetches the current index price from an aggregate of exchanges.
The keeper executes the position at the current index price.
If the position cannot be executed within the allowed slippage, the request is cancelled, and funds are returned to the user.
This process significantly reduces the risk of front-running attacks, enhancing the fairness and security of the trading environment. Users can also execute their own positions if three minutes have passed since the initial request, ensuring the protocol remains functional even without active keepers.
The PriceFeed contract is a critical component of Satoshi Perps, designed to provide accurate and manipulation-resistant price data. It works as follows:
Price Feed Keeper: Submits prices routinely for swaps.
Position Keeper: Submits prices when executing a position.
The Vault uses the price from the keeper if it’s within a configured percentage of the corresponding Resilient Price Oracle price. If the price exceeds this threshold, a spread is created between the bounded price and the Resilient Price Oracle price. This threshold is based on the historical maximum deviation of the Resilient Price Oracle price from the median price of reference exchanges.
For example, if the maximum deviation is 2.5% and the Resilient Price Oracle price for BTC is $50,000:
If the keeper price is $51,500, the pricing on the Vault would be $50,000 to $51,500.
When opening a long position, the higher price ($51,500) is used.
When closing a long position, the lower price ($50,000) is used.
For short positions, the lower price is used when opening, and the higher price when closing.
Additional safeguards include:
Price expiry: Keeper prices expire after five minutes, reverting to Resilient Price Oracle prices if no update is received.
Liquidation constraints: Liquidations can only occur if the Resilient Price Oracle price reaches the liquidation price for a position.
Watcher nodes: These verify that keeper-submitted prices haven’t been tampered with, enforcing spreads if discrepancies are detected.
Fallback Price Feeds: When a price feed from a connected oracle provider stales, the Resilient Price Oracle utilizes fallback feeds to ensure continuity of protocol operations and mitigate miss-pricing risks
Learn more about the Resilient Price Oracle in the next page.
The Satoshi token or $SAT serves as the governance token of the protocol. Key features include:
Participation in protocol governance decisions
Staking for rewards, earn a part of Satoshi Perps protocol revenue paid in $BTC
Protocol incentives for traders and SLPs through $rSAT ("Reward Satoshi")
More information on the $SAT token and future incentives coming soon...
SLP (Satoshi Liquidity Pool) tokens represent shares in asset-specific liquidity pools. Unlike general-purpose liquidity pools, Satoshi Perps’ SLPs are designed to minimize impermanent loss for liquidity providers while maintaining exposure to a base asset. Key characteristics include:
Asset-specific pools: Each SLP is tied to a particular asset class (e.g., SLP-BTC for Bitcoin-based assets).
Price determination: The value of SLP tokens is based on the worth of all tokens within the pool, factoring in the profits and losses of all currently opened positions.
Yield generation: SLP holders earn from trading fees, borrow fees, trader losses, and liquidations.
Bitcoin-Centric Design: Satoshi Perps is specifically tailored for the Bitcoin ecosystem, allowing for increased capital efficiency while maintaining collateral and earnings in BTC through SLP-BTC.
Flexible Collateral: Traders can use long-tailed Bitcoin-based assets as collateral for both long and short positions. This eliminates the need for stablecoins in the pools and allows traders to maintain their Bitcoin collateral exposure while trading.
Advanced Risk Management:
Dynamic liquidation thresholds based on position size and market volatility
Partial liquidations to allow traders to maintain portions of their positions
Liquidation guards to prevent cascading liquidations during extreme market events
Innovative Borrow Rate Mechanism: Satoshi Perps implements a borrow rate system that helps balance long and short positions while providing additional yield opportunities for SLP holders.
Satoshi Perps implements a robust access control system to ensure the security and stability of the protocol:
Controller Account: Managed by contributors, it can adjust parameters such as:
Swap and margin trading fees (up to a maximum of 5%)
Token weights for the SLP pool
Maximum allowed leverage
Maximum total capacity for long and short positions
Timelock Contract: Controls more significant changes with a 24-hour delay, including:
Listing of new tokens
Updating the price feed
Modifying core contract functionalities
Multi-sig Safety: A multi-signature wallet comprising advisors and community members can override the Timelock admin in case of detected malicious transactions.
While the core logic of Satoshi Perps contracts cannot be altered, peripheral functions like fee calculations and pricing mechanisms can be updated through a carefully controlled process.
Front-Running Protection:
Two-step transaction process for position changes
Frequent price feed updates
Base swap fee to discourage small-margin front-running attempts
Flash Loan Attack Prevention:
Use of oracle prices for key operations, making them independent of pool composition
Dynamic fees for swaps based on pool composition, preventing positive slippage exploitation
Oracle Manipulation Resistance:
Multiple price sources (Resilient Price Oracle)
Spread enforcement and cumulative delta checks
By combining these advanced features and security measures, Satoshi Perps aims to provide a robust, efficient, and secure platform for Bitcoin-backed perpetual trading, pushing the boundaries of what’s possible in decentralized finance while maintaining a strong focus on the Bitcoin ecosystem.