Timeless is a yield tokenization protocol that offers Perpetual Yield Tokens (PYTs), which give their holders a perpetual right to claim the yield generated by the underlying principal. Timeless also offers Negative Yield Tokens (NYTs), a protocol-native way to short yield rates.
1 perpetual yield token represents the right to claim the yield generated by 1 underlying token from now to forever in the future.
- Deposit
xunderlying tokens (e.g. DAI), receivexperpetual yield tokens andxnegative yield tokens. - The DAI is deposited into yield protocols like Yearn.
- A holder of
xPYTs can claim the yield earned byxDAI since the last claim at any time. - In order to redeem
xDAI from the protocol, one must burnxPYT andxNYT together.
Gate.sol: Abstract contract that mints/burns NYTs and PYTs of vaults of a specific protocol. Allows PYT holders to claim the yield earned by PYTs. Owns all vault shares.Factory.sol: Deploys NYT and PYT contracts. Tracks protocol fee info.NegativeYieldToken.sol: ERC20 token for representing NYTs.PerpetualYieldToken.sol: ERC20 token for representing PYTs.external/: Interfaces for external contracts Timeless interacts with.IxPYT.sol: Interface for xPYT vaults.YearnVault.sol: Interface for Yearn v2 vaults.
gates/: Implementations ofGateintegrated with different yield protocols.ERC20Gate.sol: Abstract implementation ofGatefor protocols using ERC20 vault shares.YearnGate.sol: Implementation ofGatethat uses Yearn v2 vaults.ERC4626Gate.sol: Implementation ofGatethat uses ERC4626 vaults.
lib/: Libraries used by other contracts.BaseERC20.sol: The basic gate-controlled ERC20 class used byPerpetualYieldTokenandNegativeYieldToken.FullMath.sol: Math library preventing phantom overflows during mulDiv operations.Multicall.sol: Enables calling multiple methods in a single call to the contract.SelfPermit.sol: Functionality to call permit on any EIP-2612-compliant token.
To install with DappTools:
dapp install timeless-fi/timeless
To install with Foundry:
forge install timeless-fi/timeless
This project uses Foundry as the development framework.
make install
make build
make test