Skip to content
Lattice

ICompoundV3Adapter

Git Source

Title: ICompoundV3Adapter

Authors: David Dada <daveproxy80@gmail.com> (https://github.com/dadadave80), Modified from Compound V3 (https://github.com/compound-finance/comet)

Compound-v3-specific config ABI. The adapter also implements IStrategy + IProtocolAdapter. Supply-only: no leverage, no oracle (1:1 base-asset accounting).

Functions

comet

Returns the Comet market this adapter supplies to.

function comet() external view returns (address);

Returns

NameTypeDescription
<none>address

vault

Returns the vault funds are returned to.

function vault() external view returns (address);

Returns

NameTypeDescription
<none>address

cometRewards

Returns the Comet rewards controller.

function cometRewards() external view returns (address);

Returns

NameTypeDescription
<none>address

setCometRewards

Sets the Comet rewards controller (admin only).

function setCometRewards(address rewards) external;

Parameters

NameTypeDescription
rewardsaddress

setRewardRecipient

Sets the reward recipient (admin only).

function setRewardRecipient(address recipient) external;

Parameters

NameTypeDescription
recipientaddress

Events

CompoundV3AdapterConfigured

Emitted once at init with the wiring.

event CompoundV3AdapterConfigured(address indexed comet, address indexed asset, address indexed vault);

Parameters

NameTypeDescription
cometaddress
assetaddress
vaultaddress

CometRewardsSet

Emitted when the rewards controller is set.

event CometRewardsSet(address indexed rewards);

Parameters

NameTypeDescription
rewardsaddress

Errors

CompoundV3AdapterBaseAssetMismatch

The base asset reported by Comet does not match the configured asset.

error CompoundV3AdapterBaseAssetMismatch(address cometBase, address configured);

Parameters

NameTypeDescription
cometBaseaddress
configuredaddress