Documentation Index
Fetch the complete documentation index at: https://voltaire.tevm.sh/llms.txt
Use this file to discover all available pages before exploring further.
Looking for Contributors! This Skill needs an implementation.Contributing a Skill involves:
- Writing a reference implementation with full functionality
- Adding comprehensive tests
- Writing documentation with usage examples
See the ethers-provider Skill for an example of a complete Skill implementation.Interested? Open an issue or PR at github.com/evmts/voltaire.
Skill — Copyable reference implementation. Use as-is or customize. See Skills Philosophy.
Interact with Aave V3 for lending, borrowing, and flash loans across multiple chains.
Planned Implementation
Supply & Borrow
import { AaveV3 } from './AaveV3.js';
const aave = AaveV3({
provider,
pool: AAVE_POOL_ADDRESS,
});
// Supply collateral
await aave.supply({
asset: USDC,
amount: parseUnits('1000', 6),
onBehalfOf: userAddress,
signer,
});
// Borrow
await aave.borrow({
asset: WETH,
amount: parseEther('0.5'),
interestRateMode: 2, // Variable
onBehalfOf: userAddress,
signer,
});
Flash Loans
// Execute flash loan
await aave.flashLoan({
receiverAddress: MY_CONTRACT,
assets: [USDC, DAI],
amounts: [parseUnits('100000', 6), parseUnits('100000', 18)],
modes: [0, 0], // 0 = no debt, 1 = stable, 2 = variable
params: encodedCalldata,
signer,
});
User Position
// Get user account data
const position = await aave.getUserAccountData(userAddress);
console.log('Total collateral:', position.totalCollateralBase);
console.log('Total debt:', position.totalDebtBase);
console.log('Health factor:', position.healthFactor);
Resources