{"id":36437833,"url":"https://github.com/Aries-Markets/aries-tssdk","last_synced_at":"2026-01-18T13:00:31.542Z","repository":{"id":125367337,"uuid":"599468563","full_name":"Aries-Markets/aries-tssdk","owner":"Aries-Markets","description":null,"archived":false,"fork":false,"pushed_at":"2025-05-13T09:51:02.000Z","size":155,"stargazers_count":3,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-05-13T10:44:19.043Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Aries-Markets.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2023-02-09T07:44:51.000Z","updated_at":"2025-05-13T09:51:07.000Z","dependencies_parsed_at":null,"dependency_job_id":"30ac69a0-ac95-4e57-b4f8-afa9104b0154","html_url":"https://github.com/Aries-Markets/aries-tssdk","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Aries-Markets/aries-tssdk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aries-Markets%2Faries-tssdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aries-Markets%2Faries-tssdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aries-Markets%2Faries-tssdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aries-Markets%2Faries-tssdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Aries-Markets","download_url":"https://codeload.github.com/Aries-Markets/aries-tssdk/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aries-Markets%2Faries-tssdk/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28536686,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-18T10:13:46.436Z","status":"ssl_error","status_checked_at":"2026-01-18T10:13:11.045Z","response_time":98,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-01-11T20:00:22.343Z","updated_at":"2026-01-18T13:00:31.520Z","avatar_url":"https://github.com/Aries-Markets.png","language":"TypeScript","funding_links":[],"categories":["**8\\. Conclusion**"],"sub_categories":["**7.4 Security, Audits, and Formal Verification**"],"readme":"# Aries Markets TypeScript SDK\n\n[![Discord][discord-image]][discord-url]\n[![Twitter][twitter-image]][twitter-url]\n\n### [Official Platform Docs](https://docs.ariesmarkets.xyz/aries-markets/)\n\n# Quickstart\n\nTo start using aries sdk, run below command in your project directory:\n\n```bash\nyarn add @aries-markets/tssdk\n```\n\n# SDK usage\n\nSee [Sample code](./test/base.test.ts)\n\n# SDK struct\n\n```ts\n/**\n * Model ReserveDetails\n */\ntype ReserveDetails = {\n  initial_exchange_rate: number;\n  reserve_amount: number;\n  total_borrowed: number;\n  total_borrowed_share: number;\n  total_cash_available: number;\n  total_lp_supply: number;\n  reserve_config: ReserveConfig;\n  interest_rate_config: InterestRateConfig;\n};\n/**\n * Model ReserveConfig\n */\ntype ReserveConfig = {\n  loan_to_value: number;\n  liquidation_threshold: number;\n  liquidation_bonus_bips: number;\n  liquidation_fee_hundredth_bips: number;\n  borrow_factor: number;\n  reserve_ratio: number;\n  borrow_fee_hundredth_bips: number;\n  withdraw_fee_hundredth_bips: number;\n  deposit_limit: number;\n  borrow_limit: number;\n  allow_collateral: boolean;\n  allow_redeem: boolean;\n  flash_loan_fee_hundredth_bips: number;\n};\n/**\n * Model InterestRateConfig\n */\ntype InterestRateConfig = {\n  min_borrow_rate: number;\n  optimal_borrow_rate: number;\n  max_borrow_rate: number;\n  optimal_utilization: number;\n};\n/**\n * Model Profile\n */\ntype Profile = {\n  id: string;\n  meta: ResourceSnapshotId;\n  profile_address: string;\n  borrowed_reserves: ProfilesBorrows[];\n  deposited_reserves: ProfilesDeposits[];\n};\n```\n\n# Move struct\n\n## Reserve\n\n```move\nstruct ReserveDetails has store, copy, drop {\n  /// Total number of LP tokens minted.\n  total_lp_supply: u128,\n\n  /// Total cash available. This should always be the same as `value(underlying_coin)`.\n  total_cash_available: u128,\n\n  /// The initial exchange rate between LP tokens and underlying assets.\n  initial_exchange_rate: Decimal,\n\n  /// Reserve amount.\n  reserve_amount: Decimal,\n\n  /// The normalized value for total borrowed share.\n  total_borrowed_share: Decimal,\n\n  /// Total amount of outstanding debt.\n  total_borrowed: Decimal,\n\n  /// The timestamp second that the interest get accrue last time.\n  interest_accrue_timestamp: u64,\n\n  /// Reserve related configuration.\n  reserve_config: ReserveConfig,\n\n  /// Interest rate configuration.\n  interest_rate_config: InterestRateConfig,\n}\n\nstruct ReserveConfig has store, drop, copy {\n    /// Loan to value ratio.\n    loan_to_value: u8,\n\n    /// Liquidation threshold.\n    liquidation_threshold: u8,\n\n    /// The bonus basis point that the liquidator get.\n    liquidation_bonus_bips: u64,\n\n    /// The percentage of liquidation bonus will go to the protocol as fee.\n    liquidation_fee_hundredth_bips: u64,\n\n    /// The ratio of loan asset value to risk-adjusted liability value in liquidation.\n    borrow_factor: u8,\n\n    /// The percentage of the interest that needs to be reserved\n    reserve_ratio: u8,\n\n    /// Borrow fee percentage with the unit of 1/100th of basis point (10^-6).\n    borrow_fee_hundredth_bips: u64,\n\n    /// A withdrawal fee is taken when a liquidity provider withdraws funds from the pool (redeem LP tokens).\n\n    /// The ratio has a unit of millionth (10^-6).\n    withdraw_fee_hundredth_bips: u64,\n\n    // 0 represents no limit\n    deposit_limit: u64,\n\n    // 0 represents no limit\n    borrow_limit: u64,\n\n    // Whether to accept it as collateral to increase the bororwing power.\n    allow_collateral: bool,\n\n    /// Whether to allow the redeem from LP tokens to underlying tokens.\n    /// This will be necessary in some extreme condition when we want to freeze\n    /// withdrawal.\n    allow_redeem: bool,\n\n    /// Borrow fee percentage for flash loans with the unit of 1/100th of basis point (10^-6).\n    /// It should be paid in addition to close the flash loan, so it is not limited to 100%\n    flash_loan_fee_hundredth_bips: u64,\n}\n\nstruct InterestRateConfig has store, drop, copy {\n    min_borrow_rate: u64,\n    optimal_borrow_rate: u64,\n    max_borrow_rate: u64,\n    optimal_utilization: u64\n}\n\n\n```\n\n## Profile\n\n```move\nstruct Profile has key {\n    /// All reserves that the user has deposited into.\n    deposited_reserves: IterableTable\u003cTypeInfo, Deposit\u003e,\n    /// All reserves that the user has deposited into that has deposit farming\n    deposit_farms: IterableTable\u003cTypeInfo, ProfileFarm\u003e,\n    /// All reserves that the user has borrowed from.\n    borrowed_reserves: IterableTable\u003cTypeInfo, Loan\u003e,\n    /// All reserves that the user has borrowed from that has borrow farming\n    borrow_farms: IterableTable\u003cTypeInfo, ProfileFarm\u003e,\n}\n\nstruct Deposit has store, drop {\n    /// The amount of LP tokens that is stored as collateral.\n    collateral_amount: u64\n}\n\nstruct Loan has store, drop {\n    /// Normalized borrow share amount.\n    borrowed_share: Decimal\n}\n```\n\n[twitter-url]: https://twitter.com/AriesMarkets\n[twitter-image]: https://img.shields.io/twitter/url?label=Aries%20Markets%20Twitter\u0026style=social\u0026url=https%3A%2F%2Ftwitter.com%2FAriesMarkets\n[discord-image]: https://img.shields.io/discord/1000012426479153172?label=Discord\u0026logo=discord\u0026style=flat~~~~\n[discord-url]: https://discord.com/invite/wD97KT29uh\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAries-Markets%2Faries-tssdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FAries-Markets%2Faries-tssdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAries-Markets%2Faries-tssdk/lists"}