Skip to content

Latest commit

 

History

History
57 lines (39 loc) · 5.32 KB

SFS_FAQ.md

File metadata and controls

57 lines (39 loc) · 5.32 KB

Introducing Mode's SFS (Sequencer Fee Sharing)

SFS FAQ

When building a layer 2 within the OP stack, block production is primarily managed by a single party, called the sequencer, which helps the network by providing the following services:

  • Providing transaction confirmations and state updates
  • Constructing and executing L2 blocks
  • Submitting user transactions to L1

Until fault proofs are implemented in the OP ecosystem these sequencers are centralized for security and managed by Mode (as every other OP chain) and that’s why Mode benefits from all the sequencer fees generated. That’s where the SFS comes in, giving part of these fees and sharing them with developers that deploy smart contracts.

Developers can earn a share of the network sequencer fees just by registering their contracts in the Fee Sharing Contract.

The Sequencer Fee Sharing (SFS) contract acts as a registry where all the balances are tracked and stored. Once you deploy your contract and register it in the SFS, you will instantly start earning fees whenever your contract is used.

When you register your contract, the SFS mints an NFT as a claim to the earned fees. This NFT is sent to the _recipient that you specify when calling the register function. The SFS NFT allows anyone who possesses it to claim the rewards for that particular smart contract. Whether the NFT is in your wallet or a smart contract, whatever entity tries to withdraw the earnings needs to hold the NFT in order to withdraw funds.

Frequently Asked Questions

  1. What is Sequencer Fee Sharing (SFS) in Mode Network?
    • SFS in Mode Network is a mechanism that allows developers to earn a portion of the network's sequencer fees. By registering their smart contracts with the SFS contract, developers can receive a share of the fees generated from transactions involving their contracts.
  2. How does a developer benefit from SFS?
    • Developers benefit from SFS by earning a share of the sequencer fees each time their registered smart contract is used in a transaction. This creates an additional revenue stream, incentivizing developers to build and maintain high-quality, frequently used contracts on the network.
  3. What is the process to register a contract in the SFS?
    • To register a contract in the SFS, developers must call the register function from within their smart contract. This action mints an NFT, which serves as a token of ownership and entitlement to the fees generated by the contract's usage.
  4. What is the role of the NFT in SFS?
    • In SFS, the NFT functions as a digital certificate, signifying the holder's right to claim fees accrued by a specific smart contract. It's a unique representation of ownership and fee entitlement, linked directly to the contract's activity.
  5. Can a contract be registered multiple times in the SFS?
    • No, each smart contract can only be registered once in the SFS. This ensures a clear and unambiguous link between a contract and its corresponding NFT for fee collection.
  6. How is the msg.sender used in the register function?
    • In the register function, msg.sender identifies the smart contract initiating the registration. This is crucial as it ensures that the contract itself, rather than an external account, is registering for fee sharing, maintaining the integrity of the SFS system.
  7. What is the purpose of the assign function in SFS?
    • The assign function is used to link a smart contract to an existing SFS NFT. This is particularly useful for dApps with multiple contracts, allowing them to accumulate revenue from all contracts under a single NFT, simplifying the fee collection process.
  8. How often are fee balances updated in the SFS?
    • In the SFS, fee balances are updated every two weeks on the mainnet and every 24 hours on the testnet. This periodic update reflects the accumulation of fees generated by the registered contracts.
  9. Who can withdraw earned fees from the SFS?
    • Withdrawal of earned fees is restricted to the holder of the SFS NFT linked to the smart contract. This can be either an Externally Owned Account (EOA) or a smart contract, provided they possess the NFT at the time of withdrawal.
  10. What happens if the withdrawal amount exceeds the earned fees?
    • If the requested withdrawal amount exceeds the available earned fees, the system automatically adjusts the withdrawal to the maximum available amount. This ensures that withdrawals are always within the bounds of the actual fees accumulated by the contract.

Found an issue?

If you have found an issue or bug, please create an issue.

If it's a quick fix, such as a misspelled word or a broken link, feel free to skip creating an issue. You can create a pull request directly.

Have feedback for us?

Feel free to create an issue with the feedback label. Our team will take a look and get back to you as soon as we can!

Reach out for help

You can discuss ideas, ask questions, and meet other members from the Mode community in our Discord.

If you like, you can also DM us on X!