Lending Pool

What is the Lending Pool?

The LegacyVault Lending Pool is a specialized smart contract built on Arbitrum Stylus that generates passive income on deposited assets.

Unlike traditional safe deposit boxes where gold or cash sits idle collecting dust, every USDC deposited into your LegacyVault is automatically routed to this pool. It utilizes a Rust-based Algorithm to calculate and compound interest daily, ensuring your legacy grows in value while it waits to be inherited.

Pool Properties

Property
Details

Yield Rate

1% Daily (Compound Interest)

Base Asset

USDC (ERC-20 Standard)

Architecture

Arbitrum Stylus (WASM) for precision math

Compounding

Auto-Compounding on every interaction

Liquidity

Instant Access (No lock-up for Owner)

Safety Cap

365-Day Loop Limit (Prevents Gas Overflow)

Technical Specification

The Lending Pool leverages the computational power of Rust to perform iterative interest calculations.

circle-info

This implementation uses integer math (U256) and a bounded iteration loop to ensure on-chain safety and predictable gas usage.

  • Safe Iteration: Calculation loops are limited to 365-day batches so the contract never hits the block gas limit, even if funds are left untouched for years.

  • Integer Precision: Instead of floating points (unsafe on-chain), Rust's strict integer math (U256) is used with scaled arithmetic.

chevron-rightCore Rust logic (actual excerpt from BE/lending-pool/src/lib.rs)hashtag
// Actual logic from BE/lending-pool/src/lib.rs

// Simple approach: 1% per day compounded
// We use iterative multiplication for accuracy
let mut current_value = principal;
let hundred = U256::from(100);
let hundred_one = U256::from(101);

for _ in 0..safe_days.to::<u64>() {
    current_value = (current_value * hundred_one) / hundred;
}