Aave v3 Repertoire on Optimism

Deployments

NameAddress
PoolV30x794a61358D6845594F94dc1DB02A252b5b4814aD (opens in a new tab)
WrappedTokenGatewayV30x60eE8b61a13c67d0191c851BEC8F0bc850160710 (opens in a new tab)
aOptWETH0xe50fA9b3c56FfB159cB0FCA61F5c9D750e8128c8 (opens in a new tab)

Action: deposit

Parameters

NameTypeDescription
tokenstring (required)ETH | Token symbols | Token addresses

Deposit token tokens into Aave v3.

Permissions:

Target: ERC-20

For ERC-20 tokens, the following functions are allowed:

🚫

If the token provided is not supported, an error will be thrown.

token · approve

Approve PoolV3 to spend token tokens on behalf of the avatar.

  • Contract: token

  • Function: approve(address,uint256)

    ParameterConstraint
    spenderequal to PoolV3
    amount-
PoolV3 · supply

Deposit token and receive aToken tokens in exchange.

  • Contract: PoolV3

  • Function: supply(address,uint256,address,uint16)

    ParameterConstraint
    assetequal to token
    amount-
    onBehalfOfequal to AVATAR
    referralCode-

Target: ETH

When token is ETH, the following functions are allowed:

WrappedTokenGatewayV3 · depositETH

Deposit ETH and receive aOptWETH tokens in exchange.

  • Contract: WrappedTokenGatewayV3

  • Function: depositETH(address,address,uint16) Ξ allow sending ETH

    ParameterConstraint
    addressequal to PoolV3
    onBehalfOfequal to AVATAR
    referralCode-

Action: withdraw

Parameters

NameTypeDescription
tokenstring (required)ETH | Token symbols | Token addresses

Withdraw token tokens from the specified market in Aave v3.

Permissions:

Target: ERC-20

For ERC-20 tokens, the following functions are allowed:

🚫

If the token provided is not supported, an error will be thrown.

PoolV3 · withdraw

Redeem aToken and withdraw token tokens.

  • Contract: PoolV3

  • Function: withdraw(address,uint256,address)

    ParameterConstraint
    assetequal to token
    amount-
    toequal to AVATAR

PoolV3 · withdraw(bytes32)

Calldata efficient wrapper of the withdraw function.
Redeem aToken and withdraw token tokens.

  • Contract: PoolV3

  • Function: withdraw(bytes32)

    ParameterConstraint
    argsScoped by assetId (see below)

The args is a 32 bytes parameter, where the first 30 bytes represent amount, and the last 2 bytes represent assetId. Only the last 2 bytes are scoped to ensure the correct assetId is used.


For example: 0x0000000000000000000000000000000000000000000000000000000f4240000c.


  amount: 1000000 (represented by 0x0000000000000000000000000000000000000000000000000000000f4240).


  assetId: 12 (represented by 0x000c).

Target: ETH

When token is ETH, the following functions are allowed:

aOptWETH · approve

Approve WrappedTokenGatewayV3 to spend aOptWETH tokens on behalf of the avatar.

  • Contract: aOptWETH

  • Function: approve(address,uint256)

    ParameterConstraint
    spenderequal to WrappedTokenGatewayV3
    amount-
WrappedTokenGatewayV3 · withdrawETH

Redeem aOptWETH and withdraw ETH tokens.

  • Contract: WrappedTokenGatewayV3

  • Function: withdrawETH(address,uint256,address)

    ParameterConstraint
    addressequal to PoolV3
    amount-
    toequal to AVATAR

Action: set_collateralisation

Parameters

NameTypeDescription
tokenstring (required)ETH | Token symbols | Token addresses
useAsCollateralboolean (required)true | false

Enable or disable token as collateral.

Permissions:

🚫

If the token provided is not supported, an error will be thrown.

PoolV3 · setUserUseReserveAsCollateral

Enable or disable token as collateral.

  • Contract: PoolV3

  • Function: setUserUseReserveAsCollateral(address,bool)

    ParameterConstraint
    assetequal to token
    useAsCollateralequal to useAsCollateral