Wrapped AE (WAE)
WAE is an AEX-9 token contract that holds AE and issues an equal balance of WAE against it. It exists because the DEX cannot work with native AE directly. Wrapping and unwrapping is always 1:1 with no price impact and no swap fee. You pay only the æternity transaction fee.
Wrap and unwrap at https://superhero.com/defi/wrap.
Addresses
| Network | WAE contract |
|---|---|
| Mainnet | ct_J3zBY8xxjsRr3QojETNw48Eb38fjvEuJKkQ6KzECvubvEcvCa |
| Testnet | ct_JDp175ruWd7mQggeHewSLS1PFXt9AzThCDaFedxon8mF8xTRF |
Why native AE cannot be pooled
AE is the chain's native coin, not a contract. A liquidity pair is a contract that holds balances
of two AEX-9 token contracts and moves them by calling transfer and transfer_allowance on
each.
- A pair contract cannot hold a reserve of native AE the way it holds a token balance.
- Native AE has no allowance mechanism, and the router moves your tokens by spending an allowance you granted it.
- The AMM's arithmetic (reserves, total supply, LP mint) is written against token balances and expects both sides to behave identically.
Wrapping solves all three. Deposit AE into the WAE contract and you hold an AEX-9 balance that is redeemable one-for-one, can sit in a pool reserve, and can be approved for the router. Every "AE pool" on the DEX is a WAE pool.
Wrap and unwrap
| Mode | Direction | What runs |
|---|---|---|
| Wrap | AE → WAE | deposit() on the WAE contract, with your AE attached as call value |
| Unwrap | WAE → AE | withdraw(amount) on the WAE contract |
- Open
/defi/wrapand connect your wallet. - Choose Wrap or Unwrap. The balance shown switches between your AE and your WAE.
- Enter an amount, or press Max or Half. Input accepts up to 18 decimal places.
- Confirm in your wallet.
The form checks your balance before enabling the button and names the symbol, the amount needed and the amount you have if it is short. The rate is fixed at 1:1 by the contract; slippage and deadline settings do not apply.
Leave AE for fees. Pressing Max in wrap mode fills in your entire AE balance, which leaves nothing to pay the transaction fee with. Wrap slightly less than the maximum.
The WAE contract
WAE.aes is the standard AEX-9 allowance machinery plus four entrypoints:
| Entrypoint | Behaviour |
|---|---|
deposit() | Payable. Credits Call.value to Call.caller and emits Deposit |
deposit_to(to) | Payable. Credits Call.value to to, emitting Deposit and Transfer |
withdraw(amount) | Debits Call.caller, then Chain.spend(Call.caller, amount) and emits Withdrawal |
total_supply() | Returns Contract.balance: the contract's own AE balance, not a stored counter |
withdrawalways pays the caller. There is no recipient argument, which is why the router unwraps into itself and then does a separateChain.spend(to, amount). See the AE-side swap entrypoints on Swapping.- The peg cannot drift.
total_supply()is the contract's AE balance, so total WAE issued and AE held are the same number by construction. There is no oracle and no redemption queue. - Withdrawing more than you hold aborts with
WAE: LOW_BALANCE. An address that has never deposited holds zero. - Only
withdrawmoves AE out. The contract has no owner-only withdrawal, pause or upgrade entrypoint.
Its metadata is fixed: name "Wrapped Aeternity", symbol "WAE", decimals 18. It declares
aex9_extensions() = ["allowances"]: no minting or burning, because deposit and withdraw are
the only ways supply changes.
When the app wraps for you
You rarely need to wrap manually:
- Swapping with native AE on either side. The router's AE-specific entrypoints
(
swap_exact_ae_for_tokens,swap_ae_for_exact_tokens,swap_exact_tokens_for_ae,swap_tokens_for_exact_ae) wrap or unwrap internally. Route-finding substitutes the WAE address for AE before looking anything up, so a route quoted as "AE to X" is "WAE to X". - Adding or removing liquidity on an AE pair.
add_liquidity_aeandremove_liquidity_aetake native AE as call value and handle the wrapping. - Selecting AE and WAE as the two sides of a swap. The swap form turns this into a wrap or unwrap at 1:1 with zero price impact rather than routing it.
Wrap manually when you want to hold WAE as a token: to grant a router allowance up front, or to interact with a pair contract directly. WAE shows up in your wallet as an ordinary AEX-9 token and may need to be added manually in some wallets.
WAE wraps the chain's own coin; aeETH represents Ethereum-side value moved across a bridge. See Bridging from Ethereum.
Related
- Swapping: where the automatic wrapping happens, and the AE-specific router entrypoints.
- Liquidity Pools: every AE pool is a WAE pool.
- DeFi & DEX overview: contract addresses for both networks in one table.
- AEX-9 tokens: the standard WAE implements.
- dex-contracts-v2 (opens in a new tab): the WAE contract and its ACI.