npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@xbank-finance/xbank-zkera

v0.1.4

Published

xBank will serve primarily as the multi-currency money market on Starknet. The vision is to be the premier money market and facilitate the lending and borrowing for participants within the Starknet DeFi ecosystem, including but not limited to retail users

Downloads

13

Readme

xBank - multi-currency money market on zkSync ERA

xBank will serve primarily as the multi-currency money market on Starknet. The vision is to be the premier money market and facilitate the lending and borrowing for participants within the Starknet DeFi ecosystem, including but not limited to retail users, protocols, and institutions.

This contract version of xBank is Compound-forked and tailored for zkSync ERA limitations and guidances.

Overview

At the start, there will be four primary types of participants in the xBank protocol.

1. Lender

  • Alice, as one of the lenders, can deposit ERC20 tokens (e.g. USDC, wETH) to the protocol lending vaults, which in return provides "xToken" to the Lender. The "xToken" is an interest-bearing token that accrues interest over time and acts as a receipt for the Lenders' deposited funds. To withdraw the funds, Lenders can convert the "xToken" back to the original ERC 20 tokens they deposited + the interest that has accrued over the deposit period.

2. Borrower

  • To become a borrower, the user must first be a lender and put up their lending deposit as collateral. With their deposit collateralized, Bob, as one of the Borrowers, can take out loans in any assets from xBank's lending vaults. The maximum borrowable amount for the Borrower is determined by the value of their collateral assets and the collateral factor of the borrowed assets. Note that just like AAVE and Compound, xBank loans are cross-margin loans.

3. Liquidator

  • Charlie, as one of the Liquidators, plays a key role in helping xBank manage risks from bad debt, especially in a volatile market condition. They are in charge of liquidating positions whose health metrics fall below a predetermined threshold. To incentivize the Liquidator to take timely action, the Liquidator will be awarded a liquidation incentive for the liquidation they initiate. The liquidation incentive paid to the Liquidator is part of the liquidation fee charged on the position owners' collateral asset.

Contracts

xtoken

  • The xtoken contract represents a self-contained interest-bearing token for users who deposit ERC20 tokens to xBank's lending vaults. Each ERC20 has a distinct pair of "xToken" e.g. ETH-xETH, USDC-xUSDC which are always exchangeable. In addition, "xToken" can be considered as an entry point for xBank basic functionalities e.g. redeem, mint, borrow, and repay.

xes

  • The xes contract acts as a mediator & approver for the "xToken", checking whether a given action can be done safely under the current context and condition.

interest-model

  • The interest-model contract represents a mathematical strategy to determine the most suitable interest rate for each asset based on the asset's dynamic utilization rate, which is a function of the asset's supply and market demand.

Compile contracts

  • yarn compile