Marlin Serverless Staking
Introduction
Marlin Serverless is a smart contract platform that enables users to submit custom jobs for execution by verifiable machines called Executors. These jobs involve user-defined inputs, and the output is returned after successful execution. To ensure that jobs are processed reliably and honestly, Marlin Serverless employs a staking system that economically rewards good behavior and penalizes failures.
Originally, staking was limited to Executors, serving as a slashing-enabled security deposit. With the upgraded model, Marlin Serverless introduces delegated staking, allowing anyone to participate by delegating stake to trusted Executors and receiving rewards. This opens up broader participation and improves network security through economic alignment.
The staking architecture is built to support not just Serverless, but future integrations across the Marlin ecosystem. Stakers can manage their delegation and flexibly switch between services or Executors using a single unified contract.
System Overview
Marlin Serverless allows users to submit jobs for execution, which are processed by Executors selected through a stake-weighted algorithm. Executors with more delegated stake have a higher chance of being chosen and receive rewards by completing jobs.
Once a job is submitted, a portion of the delegated stake for the selected Executor is locked. If the Executor completes the job within the allowed time window, rewards are distributed to both the Executor and their delegators. If the Executor fails to deliver a valid result on time, a portion of the locked stake may be slashed.
Executors that are frequently slashed may lose reputation and delegation, which in turn decreases their likelihood of being selected in future job rounds. Thus, the system strongly incentivizes reliable behavior.
This staking flow integrates both fee and bootstrapping rewards, which are received simultaneously when users stake via a Stash.
Participants and Roles
The Marlin Serverless staking system involves two key participants:
Stakers
Stakers delegate their tokens to Executors to support job execution. In return, they receive rewards—both fee rewards in USDC and bootstrapping rewards in POND. However, they also share the risk of slashing if their chosen Executor fails to execute correctly or on time.
Executors
Executors run user-submitted jobs off-chain. To increase their chances of being selected, they must attract stake from Stakers, as selection is based on delegated stake weight. Executors receive commissions from job fees and build reputation, but are also subject to slashing and delegation loss if they behave dishonestly or underperform.
This relationship creates strong incentives for both sides: Stakers seek reliable Executors, and Executors compete to prove their performance.
Staking Lifecycle
The staking process for delegators (Stakers) is structured as follows:
- Create a Stash
: A “Stash” is a token container used for delegation, created through the StakeVault contract. - Deposit Tokens
: Users can deposit any supported tokens, including multiple types simultaneously. - Delegate to Executor
: The Stash can be delegated to any registered Executor, and can be reassigned without undelegating first. - Claim Rewards
: Rewards (fee and bootstrapping) are claimed via the DelegationManager. - Undelegate and Withdraw
: Users can unassign and withdraw when exiting.
Stash
To minimize stake movement in the Relay Network, Serverless Staking continues to use the Stash abstraction from the upgraded Relay Network. A Stash can be split or merged, delegated, or re-delegated without needing to undelegate first.
StakeVault and DelegationManager
The StakeVault and DelegationManager contracts are core components of the Serverless Staking system.
StakeVault
StakeVault handles all user-facing staking interactions—creating and managing Stashes and supporting token deposits and withdrawals.
DelegationManager
DelegationManager manages the delegation relationships between Stashes and Executors. It also handles the distribution and claiming of both fee-based and bootstrapping rewards.
Job Execution and Selection Logic
When a user submits a job, the system selects an Executor using a weight-based algorithm, where Executors with higher delegated stake receive proportionally higher selection weight. However, randomness is preserved to maintain decentralization and fairness.
Once selected, the Executor must complete the job within a given time window. If successful, rewards are distributed to the Executor and their delegators. If the Executor fails, a portion of the delegated stake is slashed. This mechanism directly aligns execution performance with economic incentives.
Rewards
The staking system provides two reward types:
Fee Rewards (USDC)
Generated from user payments to Executors. After deducting a commission, Executors distribute remaining fees to their delegators.
Bootstrapping Rewards (POND)
Emitted at the end of every epoch. Executors receive a share based on their job contribution during the epoch. These are then distributed proportionally to their delegators.
Incentives for Executors
Selection Probability
Executors with higher delegated stake are selected more frequently to execute jobs. This increases their utilization rate and visibility within the network.
Reward Potential
The more jobs an Executor completes, the more they receive both USDC-based fees and POND-based bootstrapping rewards. Consistent performance directly translates into higher returns.
Slashing Risk
Executors that fail to deliver job results within the required time window risk having a portion of their delegated stake slashed. Repeated slashing leads to loss of reputation and stake, reducing future selection chances.
This system structure ensures that only reliable and high-performing Executors continue to thrive.
Summary & Benefits
The Marlin Serverless staking system is designed to be incentive-compatible, ensuring that all participants are economically aligned through a balance of rewards and penalties. Stakers vet Executors before delegating to them and receiving both USDC-based fee rewards and POND-based bootstrapping rewards. Executors, in turn, are motivated to maintain high reliability and performance in order to attract stake, increase their selection probability.
The system’s flexible Stash abstraction enables users to manage their stakes with ease, supporting multiple token types and allowing reassignment without the need to undelegate. Altogether, the design is tightly integrated with the broader Marlin ecosystem, enabling seamless and scalable staking across future services.