ramp_A

This entrypoint should be called only by admin address.

This entrypoint is designed to ramping the "A" constant, allowing to change "flattiness" of swap function.

How to set A constant?

A constant set to contract in precalculated invariant value as

Astorage=Aāˆ—nnāˆ’1A_{storage} = A * n^{n-1}

so, if you want to set A correctly you should keep it in mind.

Call parameters

FieldTypeDescription

pool_id

pool_id_t

pool identifier.

future_A

nat

the target value of "A" constant.

future_time

timestamp

timestamp when ramping should be finished.

type ramp_a_param_t     is [@layout:comb] record [
  pool_id                 : nat; 
  future_A                : nat;
  future_time             : timestamp;
]

Last updated