The Vault Architecture
At the heart of ATFi is the Commitment Vault.
What is a Vault?
The VaultATFi.sol contract is an ERC-4626 compatible vault that manages a single "event" or commitment period. Each vault is deployed by the FactoryATFi contract, ensuring bytecode verification and safety.
Properties of a Vault
Asset
The token used for staking (e.g., USDC, WETH).
Stake Amount
The fixed amount required to participate (e.g., 10 USDC).
Commitment Period
The time window from Staking Open to Settlement.
Participants
A list of addresses that have staked.
Yield Strategy
(Optional) Where the funds are deployed (e.g., Morpho).
State Machine
The vault enforces a strict state machine to prevent fund loss:
Created: Vault is deployed. Verification logic is inactive.
Staking Open: Users call
stake(). Funds are held in the vault.Event Started: Staking closes. Optionally, funds are moved to a Yield Strategy.
Settled: Owner finalizes the event. Yield is redeemed. Penalties calculated.
Claim: Users call
claim()to withdraw their share.
Last updated
