Skip to content

Latest commit

 

History

History
341 lines (274 loc) · 12.9 KB

File metadata and controls

341 lines (274 loc) · 12.9 KB

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog and this project adheres to Semantic Versioning.

0.9.6 — 2026-04-16

Added

  • High Efficiency (HE) mode — pools can define HE asset groups via poolAssetsHEConfig, each with a heCategory number. activeHeCategory activates when all borrows belong to a single HE category and the total borrow exceeds the standard collateral limit. The HE borrow limit is calculated from supply assets within the same HE category using heCollateralFactor and heLiquidationThreshold instead of standard values, allowing higher LTV within the category.
  • activeHeCategory field in UserData-1 means HE is inactive, positive integer is the active category
  • predictedHeCategory field in UserData — HE category that would activate on next borrow (based on current supply), used to show available HE borrow limit in UI
  • borrowLimitsWithEmode field in UserData — per-asset max borrow amounts under HE limits
  • availableToBorrowWithEmode field in UserData — total available to borrow under HE limits
  • New functions:
    • determineHeCategory() — derives active HE category from current borrows
    • exceedsStandardBorrowLimit() — checks whether total borrow exceeds standard collateral limit
    • getAvailableToBorrowWithEMode() — available-to-borrow under HE limits; shows HE limit whenever all borrows are within a single HE category, regardless of whether standard limit is already exceeded
    • calculateRepayToExitEMode() — how much to repay to drop back to standard mode
  • New types: PoolAssetHEConfig (title, assets, heCategory)

Fixed

  • predictHealthFactor now applies HE thresholds only when borrow exceeds the standard collateral limit
  • ClassicCollector now fetches prices from all sources in parallel via Promise.any instead of sequentially

0.9.2-a — 2025-10-24

Changed

  • updated STABLE_VERSION to 2

Fixed

  • Improve fetch factory race
  • Uses own implementation of fetch instead of HermesClient.getLatestPriceUpdates for PythCollector

0.9.2 — 2025-10-10

Added

  • added new asset EVAA
  • added EVAA Rewards MAINNET_MASTER_EVAA_REWARD_CONFIG

0.9.1-a — 2025-10-08

Added

  • added new asset in Stable Pool FIVA PT_tsUSDe_18Dec2025

0.9.1 — 2025-09-DD

Added

  • to be added

0.9.0 — 2025-09-DD

Added

  • to be added

0.7.0 — 2025-08-28

Added

  • TONUSDT_STONFI new token in LP PoolConfig

0.6.4-a — 2025-08-05

Added

  • preparing STON for listing in Alts PoolConfig
  • preparing TONUSDT_STONFI new asset in LP PoolConfig

0.6.4 — 2025-06-27

Added

  • New Stable Pool MAINNET_STABLE_POOL_CONFIG with USDT USDe and tsUSDe and something else in the future...
  • ALL_MAINNET_POOLS Array of pools

Fixed

  • calculateHealthParams function now ignore dust
  • PricesCollector prices prune

Removed

  • Iota price source

0.6.3-b — 2025-04-30

Added

  • USDe and tsUSDe new tokens in Main PoolConfig
  • Minor bug fixes

0.6.3 — 2025-04-01

Added

  • EvaaRewards wrapper of RewardUser contract with PoolAssetConfig
  • RewardUser wrapper of reward user contract
  • RewardMaster wrapper of reward master contract
  • JettonMinget wrapper of jetton master contract
  • JettonWallet wrapper of jetton wallet contract
  • EVAA_REWARDS_MASTER_CODE_MAINNET and EVAA_REWARDS_MASTER_CODE_TESTNET is constants for reward master code
  • EVAA_REWARDS_USER_CODE_TESTNET and EVAA_REWARDS_USER_CODE_MAINNET is constants for reward user code
  • TESTNET_MASTER_REWARD_CONFIG testnet TON config of reward
  • TESTNET_MASTER_EUSDT_REWARD_CONFIG testnet EUSDT config of reward
  • MAINNET_MASTER_TON_REWARD_CONFIG mainnet TON config of reward
  • MAINNET_MASTER_USDT_REWARD_CONFIG mainnet USDT config of reward

0.6.2-c — 2025-01-07

Added

  • getAssetLiquidityMinusReserves function needed to count the amount of free amount for withdrawal

Fixed

  • borrowLimits function now take into account the amount available for withdrawal

0.6.2-b — 2024-12-17

Added

  • new field in UserLiteData . fullyParsed and havePrincipalWithoutPrice true if all prices for user parsing were provided or true if have a principal without price now user.getSync and parseUserData can work without some prices
  • predictAPY - function that predicts a change in apy after supply or withdraw

0.6.2-a — 2024-12-13

Added

  • new field in UserLiteData user.data.realPrincipals - principals before applying dusts

Fixed

  • getPricesForWithdraw/getPricesForLiquidate they should now be called with a different argument

0.6.2 — 2024-11-21

Added

  • ALTS Pool
  • PricesCollector class
    • Supports multiple prices sources [iota nft, evaa backend, internetcomputer (icp) http backend] (sources can be configured)
    • Updates prices only when needed, prices may expire no earlier than a minute later
    • Ability to cut prices and resign it and send only the necessary ones in order to reduce fee
      • async getPricesForWithdraw(userPrincipals: Dictionary<bigint, bigint>, withdrawAsset: PoolAssetConfig, collateralToDebt = false, ....) 
        collateralToDebt param responsible for the fact that supply can go to borrow (there is no such case at the front end)
      • async getPricesForLiquidate(userPrincipals: Dictionary<bigint, bigint> ...)
    • Price Signature Vrification
    • Minimal Oracles Number Verification
    • Independent and parallel loading of prices (now the fastest but invalid response won't break anything)
    • Support for partial number of assets from price sources
    • Updated examples in docs/examples
    • PricesCollector test coverage
    • If the price is missing (for example, for security reasons), then there will be no error, it will simply NOT be added to the result dict

Changed

  • getPrices is deprecated use PricesCollector instead

0.6.1-a — 2024-10-29

Changed

  • updated EVAA_LP_MAINNET_VERSION to 3
  • awaitedSupply is always defined

Fixed

  • applyDust is false by default in parseUserLiteData and parseUserData
  • minimalOracles is 3 in all pools

0.6.1 — 2024-10-22

Changed

  • added liquidation.ts with findAssetById, calculateAssetsValues, selectGreatestAssets, calculateMinCollateralByTransferredAmount, calculateLiquidationAmounts, isLiquidatable, isBadDebt, addReserve, deductReserve, toAssetAmount, toAssetWorth, addLiquidationBonus, deductLiquidationBonus, PreparedAssetInfo, prepareAssetInfo functions required or flexible liquidations calculation.
  • user. getSync and getSyncLite new argument applyDust by default is false;
  • updated sdk usage example

Fixed

0.6.0a — 2024-10-14

Changed

  • user. getSync and getSyncLite new argument applyDust by default is false

Fixed

  • Healthfactor calculation minor bug
  • createLiquidationMessage fix new field payloadForwardAmount

0.6.0 — 2024-10-10

Added

  • SDK Supports Evaa v6 smart contracts

Fixed

  • Updated documentation and examples for v6 interactions
  • User Withdrawal and Borrow limits

0.5.6a - 2024-10-09

Fixed

  • Fix typo in calculateMaximumWithdrawAmount

0.5.6 — 2024-09-28

Added

  • isTonAsset(PoolAssetConfig) function

Fixed

Dust is a small amount of principal that is ignored

  • parseUserLiteData (dust) & parseUserData (dust and withdrawLimits) calculations problem
  • user.data.withdrawalLimits, user.data.balance, user.data.principals calculation for LP pool contract and main pool contract

Changed

  • parseUserLiteData (without prices), parseUserData applyDust argument default value changed to True
  • Many composite types were removed from sdk
    • PoolTonAssetConfig, PoolJettonAssetConfig -> PoolAssetConfig,
    • JettonMessageParameters, SupplyBaseParameters, TonSupplyParameters, JettonSupplyParameters -> SupplyParameters,
    • LiquidationBasePrameters, TonLiquidationParameters, JettonLiquidationParameters -> LiquidationParameters

0.5.5

Added

  • calculateMaximumWithdrawAmount function

Fixed

  • parseUserLiteData (dust) & parseUserData (dust and withdrawLimits) calculations problem

0.5.4 — 2024-09-09

check tests\supply_withdraw_test.ts for new examples

Added

  • Pools supports (new argument for Evaa master contract) + LP_POOL constants, default is MAINNET_POOL_CONFIG, default pool is MAINNET_POOL_CONFIG
const evaa = client.open(new Evaa({poolConfig: TESTNET_LP_POOL_CONFIG}));

const evaaMainNet = clientMainNet.open(new Evaa({poolConfig: MAINNET_LP_POOL_CONFIG}));
  • New types for pools initializtion, for assets check constants\assets.ts for new examples

  • getPrices - a new function inside Evaa, returns prices of current pool

await evaaMainNet.getPrices()

Changed

  • New argument nftId (depends on pool) for getPrices
export async function getPrices(endpoints: string[] = ["api.stardust-mainnet.iotaledger.net"], nftId: string = MAIN_POOL_NFT_ID) {
  • Everything about working with assets, new assets list
import { JUSDC_MAINNET, JUSDC_TESTNET, JUSDT_MAINNET, JUSDT_TESTNET, STTON_MAINNET, STTON_TESTNET, TON_MAINNET, TON_STORM_MAINNET, TONUSDT_DEDUST_MAINNET, TSTON_MAINNET, USDT_MAINNET, USDT_STORM_MAINNET } from "@evaafi/sdk";
await evaaMainNet.sendSupply(sender_mainnet, toNano(1), {
    queryID: 0n,
    includeUserCode: true,
    amount: 500_000_000n,
    userAddress: address_mainnet,
    asset: TON_MAINNET
});

Fixed

  • predictHealthFactor minor fixes
  • getUserJettonWallet all currencies support

0.5.3 — 2024-08-20

Fixed

  • getPrices now supports several endpoints (works on the principle of which one will answer faster, whose answer is used) and throws an exception if prices are not loaded

0.5.2 — 2024-08-19

Fixed

  • predictHealthFactor argument processing improving
  • getSync fixed parsing contract state, base64url was replaced to base64 encoding which has much higher support

0.5.1 — 2024-07-05

Added

  • predictHealthFactor function to predict a change in a health factor after repay, borrow, supply, withdraw

0.5.0 — 2024-06-29

This release contains breaking changes.

Added

  • Reserve variables parsing on user & master sc
  • Added endpoint argument for getPrices, default api.stardust-mainnet.iotaledger.net
  • Added applyDust (default false) option in parseUserLiteData and parseUserData

Changed

  • Master contracts' version
  • Testnet master contract address
  • Parsers on master sc
  • Parsers on user sc
  • Liquidation calculations now counts with reserve factor from master config

Fixed

  • UserBalance calculation was fixed

0.4.0 — 2024-06-01

This release contains breaking changes.

Added

  • Master storage onchain getter
  • User storage onchain getter
  • Testnet flag for parseMasterData, parseUserData and parseUserLiteData functions
  • maxTotalSupply field to Assets Config
  • Seperate Assets ID for Mainnet and Testnet

Changed

  • Master contracts' version
  • Testnet master contract address

Removed

  • ASSET_ID constant

Fixed

  • Jetton wallets address calculation
  • Field names in Assets Config and Assets Data serialization functions

0.3.2 — 2024-04-20

Added

  • New asset - Tether USD

0.3.1 — 2024-04-19

Added

  • New asset - tsTON

0.3.0 — 2024-04-04

Added

  • New asset - stTON

Changed

  • Price fetching from another source
  • Testnet master contract address
  • Master contracts' version

Removed

  • Ethereum dependencies

0.2.0 — 2024-03-13

This release contains breaking changes.

Added

  • BOC of last sent message via TonConnect. Can be obtained by getLastSentBoc function
  • Calculation of user's health factor

Changed

  • Testnet master contract address and version
  • Supply fee from 0.5 TON to 0.3 TON
  • APY moved from user data to master data

Removed

  • Description of some methods in UserContract and MasterContract

Fixed

  • Calculation of borrow limits

0.1.0 — 2024-03-11

Added

  • Parsing user lite data, which does not require prices
  • Assets reserves to MasterData
  • Types and methods descriptions in MasterContract and UserContract

Changed

  • Added parallel price fetching
  • Crypto library to 'crypto-js' for compatibility with browser
  • Testnet Master version to 2

Removed

  • sort-deep-object-arrays dependency

Fixed

  • Getting user's jetton wallet