Solvers

A solver is a computer algorithm that takes the orderbook as input and calculates the optimal prices and traded amounts for all orders and liquidity sources (such as AMMs), ensuring the best overall trading experience.

In our context, solvers are actors that find blobs of data in the Crosschain mempool and execute them in bundles. When executing these bundles the solver is required to have three userops submitted in order:

  1. Send funds to the Lamina Crosschain Paymaster to execute any crosschain calls

  2. Send funds to the signer's smart contract wallet (SCW) to execute the signer's userop

  3. Execute the signer's userop

Blob data format:

// UserOp Operation Structure: 
type UserOperation struct {
	Sender                string `json:"sender"`
	Nonce                 string `json:"nonce"`
	InitCode              string `json:"initCode"`
	CallData              string `json:"callData"`
	CallGasLimit          string `json:"callGasLimit"`
	VerificationGasLimit  string `json:"verificationGasLimit"`
	PreVerificationGas    string `json:"preVerificationGas"`
	MaxFeePerGas          string `json:"maxFeePerGas"`
	MaxPritorityFeePerGas string `json:"maxPriorityFeePerGas"`
	PaymasterAndData      string `json:"paymasterAndData"`
	Signature             string `json:"signature"`
}

// Execution Data Structure:
type ExecutionData struct {
	DestinationChain string `json:"destinationChain"`
	TargetAddress    string `json:"targetAddress"`
	Asset            string `json:"asset"`
	Amount           string `json:"amount"`
	Calldata         string `json:"calldata"`
}

// Executable Blob
type ExecutableBlob struct {
	ExecutionRequest ExecutionData `json:"execution"`
	UserOp           UserOperation `json:"userop"`
}

Becoming a solver

In Lamina, anyone can be a solver. Sophisticated and tech-savvy solver teams with their own proprietary solver algorithm can join our solver network by integrating their solvers post testing in a risk-free environment.

To join Lamina's solver network please fill out the following form. For the less tech-savvy, you can just commit liquidity to our solver network without having to develop your own algorithms and start earning rewards.

Last updated

© 2024 Lamina Labs. All Rights Reserved