formulas

package
v1.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 14, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CalculatePurchaseAmount

func CalculatePurchaseAmount(supply sdk.Int, reserve sdk.Int, crr uint, wantReceive sdk.Int) sdk.Int

func CalculatePurchaseReturn

func CalculatePurchaseReturn(supply sdk.Int, reserve sdk.Int, crr uint, deposit sdk.Int) sdk.Int

Return = supply * ((1 + deposit / reserve) ^ (crr / 100) - 1) Рассчитывает сколько монет мы получим заплатив deposit DEL (Покупка формула 2)

func CalculateSaleAmount

func CalculateSaleAmount(supply sdk.Int, reserve sdk.Int, crr uint, wantReceive sdk.Int) sdk.Int

func CalculateSaleReturn

func CalculateSaleReturn(supply sdk.Int, reserve sdk.Int, crr uint, sellAmount sdk.Int) sdk.Int

Return = reserve * (1 - (1 - sellAmount / supply) ^ (100 / crr)) Рассчитывает сколько DEL вы получите, если продадите sellAmount монет. (Продажа)

func GetReserveLimitFromCRR

func GetReserveLimitFromCRR(crr uint) sdk.Int

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL