Skip to main content

Derivative Modules

Derivative modules provide a way for Axis to support innovative payout mechanisms on a per-lot basis.

Initially, Axis supports the following derivatives:

  • Linear Vesting
    • Has a distinct start date upon which vesting will commence and end upon the expiry date
    • As the name implies, vesting will happen linearly between those two points in time

Lot Configuration

Each auction lot can be configured with a single derivative type (the Keycode for the specific derivative module), though it is optional.

If a derivative type is not provided, bidders/purchasers will receive the standard base token as a payout.

If the derivative type is provided, the latest version of that derivative module is resolved and its identifier (Veecode) is stored in the auction lot. Subsequent actions on the auction lot will reference the specific auction module version, to ensure consistency in behaviour and data storage.

Lifecycle

Derivative modules are called at key points during the lifecycle of an auction lot:

  • Atomic
    • Create auction: auction()
      • To verify that the specified derivative type (Keycode) is correct
    • Purchase: purchase()
      • To transfer the payout (base token) into the derivative module and mint the derivative token to the buyer
  • Batch
    • Create auction: auction()
      • To verify that the specified derivative type (Keycode) is correct
    • Settle auction: settle()
      • To transfer the payout (base token) into the derivative module and mint the derivative token to the curator (if applicable)
    • Claim bid: claimBids()
      • To transfer the payout (base token) into the derivative module and mint the derivative token to the buyer

Independent Deployment of Derivatives

A Derivative module can be used independent of an auction lot to deploy and mint derivative tokens.

For example:

  ILinearVesting.VestingParams derivativeParams = ILinearVesting.VestingParams({
start: uint48(block.timestamp),
expiry: uint48(block.timestamp + 24 * 60 * 60)
});
(uint256 tokenId,) = ILinearVesting(derivativeModule).deploy(
underlyingToken,
abi.encode(derivativeParams),
false
);
ILinearVesting(derivativeModule).mint(
recipient,
tokenId,
underlyingToken,
false
);

Creating a Derivative Module

The IDerivative interface outlines the functions that must be implemented. Derivative modules should inherit from the DerivativeModule abstract contract.

Derivative modules are an interesting integration point for Axis. Any external derivative formats could be integrated by developing a DerivativeModule that conforms to the required interface.

The source code to the IDerivative interface is also available.