AtomicSolverV3

Git Source

Inherits: IAtomicSolver, Auth

Author: crispymangoes

State Variables

eETH

ERC20 internal constant eETH = ERC20(0x35fA164735182de50811E8e2E824cFb9B6118ac2);

weETH

ERC20 internal constant weETH = ERC20(0xCd5fE23C85820F7B72D0926FC9b05b43E359b7ee);

Functions

constructor

constructor(address _owner, Authority _authority) Auth(_owner, _authority);

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.

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.

Errors

AtomicSolverV3___WrongInitiator

AtomicSolverV3___AlreadyInSolveContext

AtomicSolverV3___FailedToSolve

AtomicSolverV3___SolveMaxAssetsExceeded

AtomicSolverV3___P2PSolveMinSharesNotMet

AtomicSolverV3___BoringVaultTellerMismatch

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.

Was this helpful?