Sanko Mainnet Docs
  • Sanko
    • What is Sanko?
    • Sanko Overview
      • AnyTrust and the Data Availability Committee
      • Keysets
      • Data Availability Certificates​
      • Data Posting Mechanisms
      • Data Availability Servers​
      • Sequencer-Committee Interaction
    • Official Links
  • Sanko Mainnet
    • Connect to Sanko Mainnet
    • Bridge to Sanko
    • Native DEXs
      • Sankoswap
      • Camelot Exchange
        • Camelot V2
        • Camelot V3
          • Concentrated Liquidity
          • Customizable Tickspacing
          • Directional & Dynamic Volatility Fees
    • Sudoswap
      • Sudoswap Overview
        • Bonding Curves
        • Royalties
        • Settings
        • Property Checking
        • ERC1155 NFTs
      • User Guide
        • Creating a Liquidity Pool
        • Managing Existing Pools
        • Creating an Auction
        • Managing Collections
    • SankoTools
      • Terminal Elements
        • Research Elements
        • Chaindata Elements
        • Market Data Elements
        • NFT Elements
        • Chart Elements
        • Liquidity Elements
        • Portfolio Elements
        • Utility Elements
    • Run a Sanko node
  • $DMT
    • The Dream Machine Token (DMT)
    • What is $DMT?
      • How to Purchase $DMT on Arbitrum
      • How to Purchase $DMT on Ethereum
    • The Dream Machine
    • Tokenomics
  • Build on Sanko
    • Connect to Sanko Testnet
    • Deploy on Sanko Testnet
      • Foundry
      • Hardhat
      • Remix
    • Testnet Info + Faucet
    • Testnet Bridge
    • Testnet Block Explorer
    • Pyth Entropy (RNG)
  • miscellaneous
    • Sanko Terms of Use
    • Sanko Privacy Policy
    • FAQ
    • Notice
Powered by GitBook
On this page
  • Standard Settings
  • Fee Splitter
  1. Sanko Mainnet
  2. Sudoswap
  3. Sudoswap Overview

Settings

Settings are opt-in contracts that allow creators to waive (partially or entirely) royalties for liquidity pools that meet their chosen criteria, such as a 90-day lockup period or 50:50 trading fee split.

Creators can develop Settings using the logic of their choosing, but the resulting contract should conform to the ISettings.sol interface:

interface ISettings {
    struct PairInfo {
        address prevOwner;
        uint96 unlockTime;
        address prevFeeRecipient;
    }

    function getFeeSplitBps() external pure returns (uint64);

    function getRoyaltyInfo(address pairAddress) external view returns (bool, uint96);

    function settingsFeeRecipient() external returns (address payable);

    function getPrevFeeRecipientForPair(address pairAddress) external returns (address);
}

Once a Setting has been deployed, the creator of the relevant NFT collection should call toggleSettingsForCollection on the Pair Factory to ratify the Setting, thus waiving royalties for pools enrolled in that Settings.

To enroll in a Setting, liquidity providers transfer ownership of their pool to the Setting contract using the transferOwnership method on the pool contract. Creators should design Settings such that only pools which meet the desired criteria can be transferred to the Setting contract.

Standard Settings

A Standard Setting has three criteria:

  • ethCost, an upfront fee to the liquidity provider in gwei.

  • secDuration, a lockup period in seconds.

  • feeSplitBps, a trading fee split in basis points.

Any liquidity provider who accepts these criteria can participate in the Setting. Following the lockup period, the liquidity provider can call reclaimPair on the Setting contract to withdraw their pool from the Setting.

Creators can deploy Standard Settings without writing any code by using the createSettings method on the StandardSettingsFactory. In addition to the criteria above, this method takes two parameters:

  • settingsFeeRecipient, the address which will receive the creator's trading fee split.

  • royaltyBps, the waived royalty rate in basis points.

Fee Splitter

When ownership of a liquidity pool is transferred to a Standard Settings contract, a fee splitter (Splitter.sol) is deployed to handle the distribution of trading fees between the liqudity provider and creator.

Any address or contract can call the withdrawal methods on the Splitter, such as withdrawETH, to atomically withdraw all accrued fees and split them between the liqudity provider and creator per the feeSplitBps.

Additionally, Setting owners can call bulkWithdrawFees on a Setting to trigger fee withdrawal from all Fee Splitters deployed under that Setting.

PreviousRoyaltiesNextProperty Checking

Last updated 12 months ago