Documentation ¶
Index ¶
- func CalculatePurchaseAmount(supply sdk.Int, reserve sdk.Int, crr uint, wantReceive sdk.Int) sdk.Int
- func CalculatePurchaseReturn(supply sdk.Int, reserve sdk.Int, crr uint, deposit sdk.Int) sdk.Int
- func CalculateSaleAmount(supply sdk.Int, reserve sdk.Int, crr uint, wantReceive sdk.Int) sdk.Int
- func CalculateSaleReturn(supply sdk.Int, reserve sdk.Int, crr uint, sellAmount sdk.Int) sdk.Int
- func GetReserveLimitFromCRR(crr uint) sdk.Int
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CalculatePurchaseAmount ¶
func CalculatePurchaseReturn ¶
Return = supply * ((1 + deposit / reserve) ^ (crr / 100) - 1) Рассчитывает сколько монет мы получим заплатив deposit DEL (Покупка формула 2)
func CalculateSaleAmount ¶
func CalculateSaleReturn ¶
Return = reserve * (1 - (1 - sellAmount / supply) ^ (100 / crr)) Рассчитывает сколько DEL вы получите, если продадите sellAmount монет. (Продажа)
func GetReserveLimitFromCRR ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.