Rebasing & Smart Contracts
Note that standard EOA wallets are automatically enrolled in receiving yield. Users don't need to call extra functions. Your anS balance will increase as yield is distributed to your wallet.
For multi-sig wallets or other smart contracts to earn yield, they must call rebaseOptIn()
. The Governor of anS contract can also opt in any contract that doesn't support a rebaseOptIn()
call.
By default, anS held within smart contracts do not participate in rebasing and forfeit yield unless the smart contract explicitly opts in. This approach enhances the composability of these tokens in DeFi, as many protocols are not built to handle balance changes without specific account-related events being emitted.
To other DeFi protocols, anS behaves like a standard ERC-20 token until explicitly instructed to rebase. This makes them particularly compatible with automated market makers (AMMs) like Uniswap, which rely on fixed token balances and can malfunction if balances change unexpectedly.
Last updated