Starfish Finance
  • Welcome to Starfish Finance
  • About Starfish Finance
  • Get Started
    • 💰Wallets & Networks
      • Add Tokens
      • Choose NFT as your Profile Pic
    • 👯Join our Community
    • 🪙Tokenomics
    • 🤩$SEAN Utility
  • Entertainment-Fi
    • 🕹️The Entertainment-Fi
    • 🔮The Prediction Market
      • How to predict the market
    • 🪙The Coin Flip
      • How to flip a coin
  • DeFi x NFT-Fi
    • 🌊The Vault
    • 🔃Swap
    • 💰Liquidity
      • Invest Basics
      • Invest - Provide Liquidity
      • Withdraw - Remove Liquidity
      • Create Pool
    • 🌟DOT Liquid Staking
      • DOT XCM Transfer
      • Stake DOT
      • Unstake sDOT
      • Claim DOT & ASTR
    • ⭐Stake
      • Pre-Staking
      • cSEAN
      • sSEAN
    • 🧑‍🌾Farm
    • 🃏NFT-Fi
      • Collateral Ratio
      • NFT as Collateral
      • Borrower
      • Lender
      • Interest Rate Model
      • Reserve Factor
      • Liquidation
      • Whitelisting NFT
      • NFT Price Feeds
      • NFT Tier Matrix
    • 🚀Seabed Launch
      • Token Offerings
      • NFT Auction
    • 🏛️StarfishDAO
  • Concepts
    • Fees
    • Math
      • Stable Math
      • Weighted Math
  • Build
    • Contracts
Powered by GitBook
On this page
  • Overview
  • Protocol AMM Logic
  • Gas Efficiency
  • Starfish Pools
  1. DeFi x NFT-Fi

The Vault

PreviousHow to flip a coinNextSwap

Last updated 1 year ago

Overview

Starfish's fundamental component is the Vault; it is a smart contract that stores and controls all tokens in each Starfish pool. The Vault also serves as the gateway via which most Starfish operations (swaps, joins, and exits) are carried out.

Protocol AMM Logic

Contrary to conventional AMMs, the Starfish protocol distinguishes the AMM logic from the token management and accounting. Token management/accounting is administered by the vault, while each liquidity pool follows an individual AMM logic. As such, the pools are contracts external to the vault, the pool administrator can implement any arbitrary, customized AMM logic, such as fee and interest allocation, as per their preference.

Gas Efficiency

The Starfish’s protocol vault executes a smart swap by transferring uniquely the net token amounts from and to the vault, regardless of swaps being carried out in batches against multiple pools. This mechanism economizes a significant amount of gas fee in the process.

Since only final net amounts are transferred, the threshold of conducting arbitrage trades is significantly lowered. For example, an arbitrager with no tokens in his wallet detects a price asymmetry among different Starfish pools, might trade USDC for USDT in pool 1, USDT for SEAN in pool 2, and finally SEAN for USDC in pool 3, which could make him a profit in USDC.

A more realistic scenario would be, if a user trades token A for token B, knowing that he will soon trade token B for token A in a few hours, it is likely that he does not need to “receive” token B immediately after the first trade. Starfish can keep both tokens in the vault which may be used for the next trades, thus avoiding multiple ERC20 transactions before “finalizing” the intended trade. It is expected to have external aggregators, and curators relying on Starfish’s internal balances to provide trades with the lowest gas costs to their users.

At launch, the Starfish protocol will offer weighted pools (constant weight) and stable pools which are suitable for tokens that are soft pegged to each other.

Shortly after the launch, there will be smart pools, allowing ongoing parameter changes. The Starfish team expects a great variety of pools would be created by other partners, and users as the protocol development matures. All pools will be able to provide trading liquidity thanks to the smart order router.

Starfish Pools

At launch, the Starfish protocol will offer Weighted Pools (constant weight) and Stable Pools which are suitable for tokens that are soft pegged to each other.

Shortly after the launch, there will be smart pools, allowing ongoing parameter changes. The Starfish team expects a great variety of pools would be created by other partners, and users as the protocol development matures. All pools will be able to provide trading liquidity thanks to the smart order router.

🌊