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
x
underlying tokens (e.g. DAI), receivex
perpetual yield tokens andx
negative yield tokens. - The DAI is deposited into yield protocols like Yearn.
- A holder of
x
PYTs can claim the yield earned byx
DAI since the last claim at any time. - In order to redeem
x
DAI from the protocol, one must burnx
PYT andx
NYT 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 ofGate
integrated with different yield protocols.ERC20Gate.sol
: Abstract implementation ofGate
for protocols using ERC20 vault shares.YearnGate.sol
: Implementation ofGate
that uses Yearn v2 vaults.ERC4626Gate.sol
: Implementation ofGate
that uses ERC4626 vaults.
lib/
: Libraries used by other contracts.BaseERC20.sol
: The basic gate-controlled ERC20 class used byPerpetualYieldToken
andNegativeYieldToken
.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