Scripts Technical

When scripts depend on minting policies we use CurrencySymbol rather than ValidatorHash. otmAddr is Optim's address and used to receive fees.

Common Terms and Constants

A month refers to a period of 30 days exactly (6 epochs). Epoch Boundary refers to the exact LAST slot in the epoch 327. Epoch refers to the length of an epoch in slots (seconds) i.e. 432000. Stake Key may be arbitrary when not explicitly stated to be enterprise or locking.stake.

NFT Minting Policy

This universal minting policy is used for two kinds of NFTs:

  • Uniqueness NFT: This is an NFT at the token level and uniquely corresponds with the Bond Tokens and Ownership NFT assets sharing the same token name. Identifies a particular bond.

  • Ownership NFT: This token represents the borrower's rights and allows re-delegating the locked funds. As a native asset, this allows the borrower's position to be resold on a secondary market.

Bond Token

Also known as BT. Minting policy for the primary tokens of the product. Minted upon entering Open state and burned after entering Closed state. Invariant: Backed by at least 100 ADA redeemable at worst 2 years after receiving the token.

Bond Writer Validator

Validator for posting bond offer to be presented to potential lenders.The parameters for the bond's lifetime are specified in the datum. Should ensure that the Open state is entered with the correct parameters and guard minting of BT. This state can be canceled by the holder of the corresponding Ownership NFT, or (as a security measure to prevent funds getting stuck) by the owner of the stake key specified in the datum.

Open Validator

State representing active loans. In this state the position is maintained by adding margin as specified in the datum. If the position falls below its maintenance margin, or if it has run its course, it can be closed by any sender. The value in this state is delegated to the borrower's pool of choice, and the credential can be changed by the holder of the corresponding Ownership NFT.

Closed Validator

State representing completed loans. In this state holders of BT can redeem each token for the 100 ADA face value, plus a proportional cut of the interest paid in rewards. The staking credential in this state is provided by the original lender.

Last updated