Only this pageAll pages
Powered by GitBook
1 of 11

wnAPE Docs

Loading...

Getting Started

Loading...

Loading...

Basics

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Welcome Apes

GM fellow Apes and welcome to the Wrapped Native ApeCoin documentation! If you've landed on this page, you probably have some questions about what the F wnAPE is, how it works, and how you can integrate it.

You're in the right place. Continue reading to understand the basics, the possibilities, and the use cases. And of course, if you have any questions, don't hesitate to drop us a line at [email protected].

Jump right in

WTF is wnAPE?

The TL;DR

Let's Get Started

What You'll Need

How This Magic Works

The DeFi Compatibility Problem

The Smart Contract Stuff

Contract Overview

Build with wnAPE

For Devs Who Want to Get Their Hands Dirty

Technical Reference

For the nerds

Security

What We Did Right

FAQ

Frequently Asked Questions

How This Magic Works

The DeFi Compatibility Problem (And How We Solved It)

Here's the deal: most DeFi protocols are built for ERC-20 tokens with constant balances. Native rebasing tokens? They're like trying to fit a square peg in a round hole. Just like Lido discovered with stETH, "some DeFi protocols - e.g. Uniswap - require a constant balance mechanism for tokens."

wnAPE fixes this fundamental incompatibility by:

  • Constant Balance Design: Your wnAPE balance stays fixed while yield accumulates in the exchange rate

  • Universal Protocol Support: Works with ANY ERC-20 compatible protocol out of the box

  • No Special Integration Required: Protocols don't need custom code to support wnAPE

The Omnichain Revolution

Forget bridging headaches and wrapped token confusion. wnAPE uses LayerZero's OFT (Omni Fungible Token) standard, making it:

  • Natively multichain across 50+ supported networks

  • Same token everywhere - no bridge risks or liquidity fragmentation

  • Seamless transfers between chains with unified liquidity

  • Future-proof as new chains get added to LayerZero

This isn't just another bridge - it's true omnichain presence.

When you wrap your APE, here's what happens behind the scenes:

  1. You send your precious APE to our smart contract

  2. The contract does some fancy math to figure out how much wnAPE you get

  3. Fresh wnAPE tokens get minted straight to your wallet

  4. Your APE joins the yield-generating pool (and continues making you money)

Unwrapping (Getting Your APE Back)

When you want to unwrap:

  1. You burn your wnAPE tokens (RIP)

  2. The contract calculates your fair share of the APE pool

  3. Native APE gets sent to your wallet

  4. You get your share of any accumulated yield (ka-ching!)

The Yield Game

Here's where it gets spicy. wnAPE doesn't just sit there looking pretty:

  • The contract automatically gets ApeChain's native yield

  • This yield builds up in the APE pool

  • ALL wnAPE holders benefit proportionally

  • You literally do nothing and earn money (we love DeFi)

Technical Reference

Core Functions (The Important Stuff)

wrap(uint256 apeCoinAmount)

Wraps your native APE into shiny wnAPE tokens.

What you send:

  • apeCoinAmount: How much APE you want to wrap (must match msg.value or we'll revert)

What you get:

  • wnApeCoinAmount: Fresh wnAPE tokens minted just for you

Events fired:

  • Transfer(address(0), msg.sender, wnApeCoinAmount) (because transparency)

unwrap(uint256 wnApeCoinAmount)

Unwraps your wnAPE back to native APE (with yield bonus).

What you send:

  • wnApeCoinAmount: How much wnAPE you want to unwrap

What you get:

  • apeCoinAmount: Native APE sent to your wallet

Events fired:

  • Transfer(msg.sender, address(0), wnApeCoinAmount) (bye bye wnAPE)

View Functions (For the Curious)

getWnApeCoinByApeCoin(uint256 apeCoinAmount)

Preview how much wnAPE you'd get for a given APE amount.

getApeCoinByWnApeCoin(uint256 wnApeCoinAmount)

Preview how much APE you'd get for unwrapping wnAPE.

apeCoinPerToken()

Shows how much APE one wnAPE token is worth.

tokensPerApeCoin()

Shows how many wnAPE tokens you get per APE.

Standard ERC-20 Stuff

We implement all the boring but necessary ERC-20 functions:

  • balanceOf(), transfer(), approve(), transferFrom()

  • totalSupply(), allowance()

You know the drill.

The Smart Contract Stuff

Contract Overview (For the Tech Savvy)

Our contract is deployed on ApeChain and it's built different:

  • Uses the battle-tested Solady library (because we're not reinventing the wheel)

  • Fully trustless (no admin keys, no rug pulls)

  • Gas optimized (your wallet will thank you)

  • Omnichain ready with OFT magic

Key Specs

  • Name: Wrapped Native ApeCoin (fancy, right?)

  • Symbol: wnAPE (short and sweet)

  • Decimals: 18 (standard stuff)

  • Network: ApeChain (where else?)

Security Features (We're Not Messing Around)

  • Zero Admin Keys: Once deployed, we can't touch it

  • Immutable Logic: The core wrapping logic is set in stone

  • Audited Libraries: We use libraries that have been battle-tested

  • Full Transparency: Everything is on-chain and verifiable

License: MIT (open source FTW)

Security

What We Did Right

Our contract is built on solid foundations:

  • Solady Libraries: Audited, battle-tested, and gas-optimized

  • Safe Math: Uses FixedPointMathLib for precise calculations

  • Safe Transfers: SafeTransferLib ensures your ETH transfers don't fail

  • Input Validation: We check everything twice (trust but verify)

The Risks (Because We're Not Delusional)

  1. Smart Contract Risk: Code is law, but code can have bugs

  2. ApeChain Dependency: We're only as strong as ApeChain itself

How to Stay Safe

  • Double-check transaction details (seriously)

  • Keep your private keys private (duh)

  • Verify contract addresses (don't get phished)

Build with wnAPE

For Developers Who Want to Get Their Hands Dirty

The Basic Interface

// Everything you need to know about our contract
interface IWnAPE {
    function wrap(uint256 apeCoinAmount) external payable returns (uint256);
    function unwrap(uint256 wnApeCoinAmount) external returns (uint256);
    function getWnApeCoinByApeCoin(uint256 apeCoinAmount) external view returns (uint256);
    function getApeCoinByWnApeCoin(uint256 wnApeCoinAmount) external view returns (uint256);
}

Wrapping APE Like a Boss

Unwrapping When You Need That Native APE

For DeFi Protocols (Let's Build the Future)

wnAPE is perfect for:

  • DEX Integrations: Create juicy APE/wnAPE or wnAPE/USDC pairs

  • Lending Protocols: Use wnAPE as collateral (it's solid)

  • Yield Farming: Set up wnAPE staking pools

  • Cross-Chain Protocols: Leverage our OFT superpowers

Hot Take: If you're building on ApeChain and not integrating wnAPE, you're probably doing it wrong.

// Wrap native APE programmatically
function wrapMyAPE(uint256 amount) external payable {
    require(msg.value == amount, "Don't try to cheat us");
    uint256 wnApeReceived = IWnAPE(wnApeContract).wrap{value: amount}(amount);
    // Now you have wnAPE tokens, go wild!
}
// Get your APE back when you need it
function unwrapMyWnAPE(uint256 wnApeAmount) external {
    // Approve the contract first (boring but necessary)
    IERC20(wnApeContract).approve(wnApeContract, wnApeAmount);
    uint256 apeReceived = IWnAPE(wnApeContract).unwrap(wnApeAmount);
    // Boom, you got your APE back (plus yield)
}

FAQ (Your Questions Answered)

The Basics

Q: So wnAPE is just wrapped APE? A: Yes, but with benefits! It's APE that can play in DeFi while earning yield.

Q: Are there any fees for wrapping/unwrapping? A: Nope! Just gas fees. We're not here to nickel and dime you.

Q: How do you calculate the exchange rate? A: It's based on the total wnAPE supply vs. the contract's APE balance (including yield).

Technical Stuff

Q: Can I just send APE to the contract? A: Yep! The contract has a receive function that auto-wraps. Pretty neat, right?

Q: Is this contract upgradeable? A: Hell no. It's immutable and trustless. Once deployed, not even we can change it.

Q: How does the automatic yield work? A: ApeChain has this cool automatic yield feature. Our contract is configured to receive it, and it benefits all wnAPE holders.

Cross-Chain Questions

Q: Can I use wnAPE on other chains? A: Absolutely! We're built as an OFT, so cross-chain transfers are supported.

Q: How do I bridge wnAPE? A: Use LayerZero-compatible bridges or our OFT adapter functionality.

Q: Is wnAPE the same on all chains? A: Yes! The OFT standard ensures consistency across all supported chains.

The Real Questions

Q: Wen moon? A: Already there, we're just waiting for everyone else to catch up.

Q: Is this financial advice? A: Definitely not. We're just building cool stuff. DYOR and all that.

Q: Why should I trust you? A: Don't trust us, trust the code. It's all open source and immutable.


Need Help?

Got questions? Want to chat? Need help integrating? Hit us up:

  • Email: [email protected] (we actually read these)

  • Website: https://wnape.io

  • Developers: GitHub

Remember: We're building in public, so don't be shy about reaching out. The APE community is stronger together.


WTF is wnAPE?

The TL;DR

wnAPE is your native ApeCoin but wrapped into an ERC-20 token. Think of it as putting your APE in a fancy suit that lets it dance with all the DeFi protocols, DEXs, and cross-chain bridges out there.

Why Should You Care?

Your native APE is cool, but it's stuck being... well, native and rebasing. Most DeFi protocols can't handle native tokens - they need that sweet ERC-20 compatibility. wnAPE solves this fundamental problem by:

  • Universal DeFi Compatibility: Like Lido's wstETH, wnAPE uses a constant balance mechanism that DeFi protocols actually understand - no more being locked out of lending protocols, DEXs, or yield farms

  • True Omnichain Presence: Built with LayerZero OFT technology, wnAPE lives natively across multiple chains - not just bridged copies, but the SAME token everywhere

  • Automatic Yield Accumulation: Your wrapped APE keeps earning ApeChain's native yield while you use it in DeFi (it's like having your cake and eating it too)

The Bottom Line

Think of wnAPE as the wstETH of the APE ecosystem. Just like Lido's wstETH solved DeFi compatibility for staked ETH by using a constant balance mechanism, wnAPE transforms your native APE into a DeFi-native powerhouse. You get all the benefits of your native APE PLUS the superpowers of an ERC-20 token that works everywhere.

The wnAPE Advantage:

  • Multi-chain by design: Native presence across 50+ chains via LayerZero OFT

  • DeFi protocol ready: Constant balance mechanism that every protocol understands

  • Yield-generating: Automatic ApeChain yield accumulation while you DeFi

  • Composable: Stack it, lend it, farm it, bridge it - the possibilities are endless

Check Us Out

  • Website: (obviously)

  • wnAPE Smart Contract on ApeChain:

  • wnAPE Smart Contract on Mainnet:

  • wnAPE OFT Adapter on ApeChain:

Zero Compromise: Fully trustless, immutable, and decentralized - no admin keys, no gatekeepers
https://wnape.io
0x692D063AC2DaA22e4B830F62BB8f19d8be39B1b4
0x692D063AC2DaA22e4B830F62BB8f19d8be39B1b4
0x28fb83c219ECb350ddB6A745829433A3374573F8

Let's Get Started

What You'll Need

Before we dive into the fun stuff, make sure you have:

  • A wallet that doesn't suck (MetaMask, WalletConnect, whatever floats your boat)

  • Some native APE on ApeChain (duh)

  • A tiny bit of APE for gas (because nothing in life is free)

Your First Wrap (It's Easier Than You Think)

  1. Connect Your Wallet

    • Head to

    • Connect your wallet (we don't judge your choice)

    • Make sure you're on ApeChain (seriously, check this)

Pro Tip: You can literally just send APE directly to the contract and it'll wrap automatically. We're not saying you should, but you could.

Wrap That APE

  • Enter how much APE you want to wrap

  • Hit "Wrap" and sign the transaction

  • Watch as your wnAPE tokens appear (magic!)

  • Unleash DeFi Superpowers

    • Use as collateral in lending protocols (Aave, Compound style)

    • Provide liquidity on any DEX across 50+ chains

    • Stake in yield farms and earn double rewards

    • Bridge seamlessly without wrapped token confusion

    • Integrate into complex DeFi strategies

  • wnape.io