Delta.sol
Public Methods
totalAssets
function totalAssets() public view returns (uint256)
Returns the total amount of thUSD held in the vault.
getUnvestedAmount
function getUnvestedAmount() public view returns (uint256)
Returns the current amount of unvested rewards.
getUserEscrow
function getUserEscrow(address user) public view returns (uint256, uint256)
Returns the escrowed amount and end time for a user.
user
address
User to query escrow for
beginEscrowAssets
function beginEscrowAssets(uint256 assets, address receiver, address owner) external
Initiates escrow based on asset amount.
assets
uint256
thUSD amount to escrow
receiver
address
Who will receive thUSD after escrow
owner
address
Owner of the assets
beginEscrowShares
function beginEscrowShares(uint256 shares, address receiver, address owner) external
Initiates escrow based on DELTA share amount.
shares
uint256
Share amount to escrow
receiver
address
Who will receive thUSD after escrow
owner
address
Owner of the shares
endEscrow
function endEscrow(address receiver) external
Completes the escrow and sends thUSD to the receiver. This method reverts if the escrow duration has not elapsed.
receiver
address
Recipient of thUSD
withdraw
function withdraw(uint256 assets, address receiver, address owner) public returns (uint256)
Overrides ERC4626 withdrawal with escrow logic.
assets
uint256
thUSD amount to withdraw
receiver
address
Who will receive thUSD (via escrow)
owner
address
Owner of the DELTA shares
redeem
function redeem(uint256 shares, address receiver, address owner) public returns (uint256)
Overrides ERC4626 redeem with escrow logic.
shares
uint256
DELTA shares to redeem
receiver
address
Who will receive thUSD (via escrow)
owner
address
Owner of the shares
Permissioned Methods
sendRewards
function sendRewards(uint256 amount) external
Adds new rewards to the vault for vesting.
amount
uint256
thUSD amount to vest
Admin Methods
setEscrowDuration
function setEscrowDuration(uint256 duration) external
Sets the global escrow duration.
duration
uint256
Escrow time in seconds
setRewardsVestingDuration
function setRewardsVestingDuration(uint256 duration) external
Sets the duration for reward vesting.
duration
uint256
Vesting time in seconds
Last updated