---
# System prepended metadata

title: Untitled

---



**VaultImplementation**

Create a new loan:
```
commitToLien(IAstariaRouter.Commitment calldata params, address receiver) returns (uint256 lienId, ILienToken.Stack[] memory stack);
```
Uses:
```
struct IAstariaRouter.Commitment {
    address tokenContract;
    uint256 tokenId;
    NewLienRequest lienRequest;
  }
```
```
struct IAstariaRouter.NewLienRequest {
    StrategyDetails strategy;
    ILienToken.Stack[] stack;
    bytes nlrDetails;
    MerkleData merkle;
    uint256 amount;
    uint8 v;
    bytes32 r;
    bytes32 s;
  }
```
```
struct IAstariaRouter.StrategyDetails {
    uint8 version;
    uint256 deadline;
    address vault;
  }
```
```
struct IAstariaRouter.MerkleData {
    bytes32 root;
    bytes32[] proof;
  }
```
```
struct ILienToken.Stack {
    Lien lien;
    Point point;
  }
```
```
struct ILienToken.Lien {
    address token;
    address vault;
    bytes32 strategyRoot;
    uint256 collateralId;
    Details details;
  }
```
```
struct ILienToken.Details {
    uint256 maxAmount;
    uint256 rate; //rate per second
    uint256 duration;
    uint256 maxPotentialDebt;
    uint256 liquidationInitialAsk;
  }
```
```
struct ILienToken.Point {
    uint88 amount;
    uint8 position;
    uint40 last;
    uint40 end;
    uint256 lienId;
  }
```

Refinance a loan:
```
function buyoutLien(
    uint256 collateralId,
    uint8 position,
    IAstariaRouter.Commitment calldata incomingTerms,
    ILienToken.Stack[] calldata stack
  ) returns (ILienToken.Stack[] memory, ILienToken.Stack memory);
```



**AstariaRouter**

Create a PrivateVault:
```
function newVault(address delegate) external returns (address);
```


Liquidate an expired lien:
```
function liquidate(ILienToken.Stack[] calldata stack, uint8 position) external returns (OrderParameters memory);
```

**PublicVault**
Begin a withdrawal (deposit VaultTokens and receive an equivalent amount of WithdrawTokens redeemable for WETH by the end of ```epoch + 1```)
```
 function redeemFutureEpoch(
    uint256 shares,
    address receiver,
    address owner,
    uint64 epoch
  ) external returns (uint256 assets);
```

**CollateralToken**
Claim the underlying NFT for a liquidated CollateralToken after an auction (permissionless):
```
function listForSaleOnSeaport(ListUnderlyingForSaleParams calldata params)
    external;
```
Uses:
```
struct ListUnderlyingForSaleParams {
    ILienToken.Stack[] stack;
    uint256 listPrice;
    uint56 maxDuration;
  }
```

**WithdrawProxy**
Redeem WETH from WithdrawTokens:
```
function redeem(
    uint256 shares,
    address receiver,
    address owner
  ) returns (uint256 assets);
```