Everstrat Docs home
DevelopersContracts

AMM

Immutable ETH entry, immediate redemption, queued requests, and pull-based claims.

Responsibilities

AMM accepts native ETH, mints EVE, and handles redemptions. Its bytecode is immutable, but its registered peers, connector weight, minimum queued exit, and pause state are configurable.

Entry points

function enter(uint256 _minTokensToMint) external payable
function enterWithInvite(uint256 _minTokensToMint, bytes32 _inviteId, uint256 _deadline, bytes calldata _signature) external payable
function exit(uint256 _requestedETH, uint256 _maxTokensToBurn, uint256 _priceTolerance) external returns (uint256)
function cancelRedemption(uint256 _batchId) external
function claim() external
function processRedemption(uint256 _batchId, address _user) external payable

enter takes no ETH amount argument; the deposit is msg.value. During the active invite period, a new user needs valid invite authorization.

Pricing and dependencies

Base price uses net NAV divided by live supply. Live supply excludes the EVE escrow corresponding to priced, unprocessed, unexpired redemption liabilities. Entry price divides base price by connector weight.

ETH pricing does not require a direct ETH/USD conversion on every trade. However, it reads StrategyManager NAV, which can depend on token feeds and pool TWAPs. Failed NAV valuation can therefore block normal entry and exit. See Pricing.

The deployed AMM has no 5% NAV checkpoint guard or checkpoint-reset function. User bounds are minTokensToMint, maxTokensToBurn, and queued priceTolerance.

Queued exits and claims

If free AMM ETH is sufficient, EVE is burned and ETH paid in the exit transaction. Otherwise EVE is escrowed in AMM, while ExitQueue records request metadata. The registered Controller calls processRedemption to burn escrow and credit claimable ETH. The user then calls claim(); processed redemptions do not send ETH automatically.

lockedForClaims is excluded from AMM free balance and cannot fund another exit. An unpriced request can be cancelled; a priced, unprocessed request can be cancelled only strictly more than three days after pricing. Processed requests must be claimed.

Authorization and pausing

  • ADMIN configures parameters and unpauses.
  • ADMIN or SECURITY can pause.
  • processRedemption checks the caller against the registered Controller address. There is no CONTROLLER_ROLE.
  • Entry, exit, and processing are pause-gated. Cancellation and claims remain callable while paused.

See Current deployments for the dated mainnet snapshot.

Last updated on

On this page