Skip to main content

How to Bond atlETH

A solver is required to bond atlETH to the Atlas contract in order to participate in auctions. Read more about atlETH.

1. Select an account

The account (EOA) bonding atlETH must be the same account that will sign the solver operations (defined in the from field of the solver operation).

info

Atlas allows solvers to participate in only one auction per block. This is to mitigate atlETH double spending attack vector. If a solver needs to participate in more than one auction in a block, they will need as many accounts (EOA) with bonded atlETH as needed.

2. Deposit and Bond

The depositAndBond function on the Atlas contract must be called.

Depositing and bonding atlETH
interface IAtlas {
function depositAndBond(uint256 amountToBond) external payable;
}

address atlasAddress = address(0x1234);
uint256 amountToBond = 1e18;

IAtlas(atlasAddress).depositAndBond{ value: amountToBond }(amountToBond);
warning

The bonded amount is credited to the function caller. Ensure you are calling with the proper account.

info

The Atlas contract addresses per chain can be found in the Deployments section.

3. How to Unbond

Solvers can recover their funds in 2 steps:

  • Call the unbond function, and wait for the unbonding period.
  • Call the redeem function.
Unbonding and redeeming atlETH
interface IAtlas {
function unbond(uint256 amount) external;
function redeem(uint256 amount) external;
function ESCROW_DURATION() external view returns (uint256);
}

address atlasAddress = address(0x1234);
uint256 amountToUnbond = 1e18;

IAtlas(atlasAddress).unbond(amountToUnbond);

uint256 escrowDuration = IAtlas(atlasAddress).ESCROW_DURATION();

// Must wait `escrowDuration` blocks before calling `redeem`.

IAtlas(atlasAddress).redeem(amountToUnbond);