AtomicSolverV2
Inherits: IAtomicSolver, Auth
Author: crispymangoes
State Variables
eETH
weETH
Functions
constructor
p2pSolve
Solver wants to exchange p2p share.asset() for withdraw queue shares.
Solver should approve this contract to spend share.asset().
redeemSolve
Solver wants to redeem withdraw offer shares, to help cover withdraw.
offer
MUST be an ERC4626 vault.
redeemLiquidSolve
Solver wants to redeem withdraw offer shares, to help cover withdraw.
offer
MUST be an ERC4626 vault.
finishSolve
Implement the finishSolve function WithdrawQueue expects to call.
nonReentrant is not needed on this function because it is impossible to reenter, because the above solve functions have the nonReentrant modifier. The only way to have the first 2 checks pass is if the msg.sender is the queue, and this contract is msg.sender of Queue.solve()
, which is only called in the above functions.
_p2pSolve
Helper function containing the logic to handle p2p solves.
_redeemSolve
Helper function containing the logic to handle redeem solves.
_redeemLiquidSolve
Helper function containing the logic to handle redeem solves.
Errors
AtomicSolverV2___WrongInitiator
AtomicSolverV2___AlreadyInSolveContext
AtomicSolverV2___FailedToSolve
AtomicSolverV2___SolveMaxAssetsExceeded
AtomicSolverV2___P2PSolveMinSharesNotMet
AtomicSolverV2___RedeemSolveMinAssetDeltaNotMet
Enums
SolveType
The Solve Type, used in finishSolve
to determine the logic used.
P2P Solver wants to swap share.asset() for user(s) shares
REDEEM Solver needs to redeem shares, then can cover user(s) required assets.