Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
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].
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
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
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:
You send your precious APE to our smart contract
The contract does some fancy math to figure out how much wnAPE you get
Fresh wnAPE tokens get minted straight to your wallet
Your APE joins the yield-generating pool (and continues making you money)
When you want to unwrap:
You burn your wnAPE tokens (RIP)
The contract calculates your fair share of the APE pool
Native APE gets sent to your wallet
You get your share of any accumulated yield (ka-ching!)
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)
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)
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.
We implement all the boring but necessary ERC-20 functions:
balanceOf(), transfer(), approve(), transferFrom()
totalSupply(), allowance()
You know the drill.
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
Name: Wrapped Native ApeCoin (fancy, right?)
Symbol: wnAPE (short and sweet)
Decimals: 18 (standard stuff)
Network: ApeChain (where else?)
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)
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)
Smart Contract Risk: Code is law, but code can have bugs
ApeChain Dependency: We're only as strong as ApeChain itself
Double-check transaction details (seriously)
Keep your private keys private (duh)
Verify contract addresses (don't get phished)
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
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)
}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).
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.
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.
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.
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.
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)
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