Skip to content

Instantly share code, notes, and snippets.

@jordaniza
Created September 15, 2025 16:02
Show Gist options
  • Select an option

  • Save jordaniza/973d2e651199c51249973c9e275fe014 to your computer and use it in GitHub Desktop.

Select an option

Save jordaniza/973d2e651199c51249973c9e275fe014 to your computer and use it in GitHub Desktop.
Considerations for Injecting an Exogenous Token into Aerodrome

Considerations for Injecting an Exogenous Token into Aerodrome

Executive Summary

Replacing the native AERO token with an exogenous token in Aerodrome is technically feasible due to the protocol's modular architecture. However, this integration requires careful consideration of interface compatibility, minting mechanisms, governance implications, and economic effects. This document provides a comprehensive analysis of all considerations for such an integration.

Technical Requirements

1. Interface Compatibility

The exogenous token MUST implement the IAero interface:

interface IAero is IERC20 {
    function mint(address account, uint256 amount) external returns (bool);
    function minter() external view returns (address);
}

Reference: /home/jordan/Documents/dev/crypto/aragon/aerodrome/contracts/interfaces/IAero.sol

2. Minting Mechanism

Critical Requirement: The token must allow the Aerodrome Minter contract to have exclusive minting rights.

Current Implementation:

function mint(address account, uint256 amount) external returns (bool) {
    if (msg.sender != minter) revert NotMinter();
    _mint(account, amount);
    return true;
}

Reference: /home/jordan/Documents/dev/crypto/aragon/aerodrome/contracts/Aero.sol:27-31

Considerations:

  • If the exogenous token has existing minting logic, it must be compatible
  • Multiple minters could break Aerodrome's emission schedule
  • Pre-existing supply affects inflation calculations

3. Contract Dependencies

No contracts have hardcoded AERO addresses. Token references flow through:

  1. VotingEscrow → stores token address
  2. Minter → reads from VotingEscrow: aero = IAero(IVotingEscrow(_ve).token())
  3. Voter → reads from VotingEscrow: rewardToken = IVotingEscrow(_ve).token()
  4. RewardsDistributor → reads from VotingEscrow: token = ve.token()

Reference: /home/jordan/Documents/dev/crypto/aragon/aerodrome/contracts/Minter.sol:69

Economic Considerations

1. Pre-existing Supply Impact

If the exogenous token has existing supply:

  • Inflation Rate Changes: Emission calculations based on total supply will differ
  • Dilution Effects: Existing holders face different dilution than intended
  • Growth Calculations: Anti-dilution formulas assume starting from zero

Growth Formula Impact:

_growth = (((_minted * (_aeroTotal - _veTotal)) / _aeroTotal) * 
          (_aeroTotal - _veTotal)) / _aeroTotal / 2;

Reference: /home/jordan/Documents/dev/crypto/aragon/aerodrome/contracts/Minter.sol:139

2. Token Distribution

Considerations:

  • Existing token holders vs new participants
  • Fair launch vs pre-mine implications
  • Initial liquidity and voting power concentration

3. External Token Utility

If the token has utility outside Aerodrome:

  • Competing Incentives: Users may prefer external uses over locking
  • Price Volatility: External factors affect LP incentives
  • Liquidity Fragmentation: Token liquidity split across ecosystems

Governance Implications

1. Minting Control

Critical Issue: Aerodrome governance would not control token minting if external governance exists.

Potential Conflicts:

  • External governance could mint tokens outside emission schedule
  • Aerodrome's inflation assumptions could be violated
  • Tail emission governance becomes meaningless

2. Protocol Upgrades

Considerations:

  • Token upgrades must maintain IAero interface
  • Breaking changes could halt Aerodrome operations
  • Coordination required between two governance systems

3. Emergency Controls

If exogenous token has:

  • Pause Functionality: Could freeze Aerodrome operations
  • Blacklist Features: Could block protocol contracts
  • Admin Functions: Could interfere with emissions

Implementation Considerations

1. Deployment Modifications

Required changes:

// Deploy exogenous token (must implement IAero)
const token = await ExogenousToken.deploy();

// Ensure Minter can mint
await token.setMinter(minter.address);

// Deploy VotingEscrow with token
const ve = await VotingEscrow.deploy(token.address, ...);

2. SafeERC20 Compatibility

The token MUST be compatible with OpenZeppelin's SafeERC20:

  • Cannot revert on transfer failure (should return false)
  • Must emit proper Transfer events
  • Standard ERC20 compliance required

3. ERC20Permit Integration

Current AERO uses ERC20Permit for gasless approvals:

  • If not supported, some integrations may need updates
  • Frontend changes required for approval flows
  • Gas optimization benefits lost

Reference: /home/jordan/Documents/dev/crypto/aragon/aerodrome/contracts/Aero.sol:12

Special Considerations for ERC20Votes

If using an ERC20Votes token with delegation:

1. Double Voting Prevention

Issue: Votes could be counted in both systems

  • ERC20Votes: Direct token voting
  • VotingEscrow: veNFT-based voting

Solution Options:

  • Disable ERC20Votes when locked in VotingEscrow
  • Use only one voting system
  • Implement careful accounting to prevent double-counting

2. Delegation in Liquidity Pools

Current Limitation: Tokens in liquidity pools cannot delegate without pool contract support.

Potential Solution:

// Modified pool contract
function delegateTokens(address delegatee) external onlyGovernance {
    IERC20Votes(token).delegate(delegatee);
}

Challenges:

  • Requires modifying all pool contracts
  • Gas costs for delegation transactions
  • Complexity in tracking delegations

3. Voting Power Calculation

Must decide between:

  • Option A: Use veNFT voting only (current system)
  • Option B: Combine ERC20Votes + veNFT voting
  • Option C: Use ERC20Votes only (major redesign)

Security Considerations

1. Token Security Audit

Requirements:

  • Audit minting logic for vulnerabilities
  • Verify no hidden minting functions
  • Check for upgradability risks

2. Integration Testing

Critical Tests:

  • Minting permissions and restrictions
  • Emission schedule calculations with pre-existing supply
  • Edge cases in growth calculations
  • SafeERC20 compatibility

3. Emergency Procedures

Plan for:

  • Token contract compromise
  • External governance attacks
  • Minting key loss or theft

Migration Path

Phase 1: Preparation

  1. Audit exogenous token for compatibility
  2. Deploy test environment
  3. Verify all integrations

Phase 2: Deployment

  1. Deploy fresh Aerodrome contracts with exogenous token
  2. Transfer minting rights to Minter contract
  3. Initialize emission schedule

Phase 3: Migration

  1. Enable token swaps if migrating existing deployment
  2. Migrate liquidity and positions
  3. Transfer governance control

Risk Assessment

High Risks

  1. Loss of Minting Control: External governance could break emissions
  2. Interface Incompatibility: Token changes could break protocol
  3. Economic Misalignment: External utility conflicts with Aerodrome incentives

Medium Risks

  1. Double Voting: ERC20Votes + veNFT overlap
  2. Delegation Complexity: Pool delegation implementation challenges
  3. Supply Assumptions: Pre-existing supply affects calculations

Low Risks

  1. Gas Costs: Potential increase without ERC20Permit
  2. UI Updates: Frontend changes for different token
  3. User Education: Explaining new token mechanics

Recommendations

1. Preferred Token Characteristics

  • Minimal pre-existing supply
  • No external minting rights
  • No pause/blacklist functions
  • ERC20Permit support
  • Simple, immutable design

2. If Using ERC20Votes

  • Disable token-based voting when locked
  • Implement delegation at veNFT level only
  • Avoid complex delegation schemes in pools

3. Governance Structure

  • Ensure Aerodrome governance has ultimate minting control
  • Establish clear coordination with external governance
  • Define emergency procedures and controls

Conclusion

Integrating an exogenous token into Aerodrome is technically feasible but requires careful consideration of minting control, governance alignment, and economic implications. The protocol's modular architecture supports token replacement, but success depends on choosing a compatible token and properly managing the complex interactions between emission schedules, voting systems, and external token utility. The most critical requirement is maintaining exclusive minting control to preserve Aerodrome's emission schedule integrity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment