Contracts

Kashi contracts are deployed across multiple networks. Fully supported networks are Ethereum, Kovan and Binance Smart Chain. More are in development.

Deployments

Ethereum
Binance Smart Chain
Matic (Polygon)
HECO
Fantom
Ethereum

Contracts for Ropsten, Kovan, Rinkeby and Goerli are at the same addresses

Binance Smart Chain

Contracts for Binance SmartChain Testnet are at the same addresses

Matic (Polygon)

HECO

Fantom

Units of Value

Throughout the code, units a value are expressed in different terms to means different representations

Unit

Meaning

Amount

The actual ERC20 token amount

Share

BentoBox shares, representing a share of the ERC20 token amount in the BentoBox

Fraction

Market LP fractions, representing a fraction of the BentoBox shares supplied to a market for lending and NOT yet borrowed. This this NOT include borrowed assets!

Part

Borrow parts or debt parts, representing a part of the total debt in ERC20 token amount

Here's a table of how to translate between the different units

From

To

Formula

Amount

Share

shares=amountbentobox.totalSupplytoken.balanceof(bentobox)shares = amount * \frac{bentobox.totalSupply}{token.balanceof(bentobox)}

Share

Amount

amount=sharestoken.balanceOf(bentobox)bentobox.totalSupplyamount = shares * \frac{token.balanceOf(bentobox)}{bentobox.totalSupply}

Share

Fraction

fractions=sharesmarket.totalAsset.basemarket.totalAsset.elasticfractions = shares * \frac{market.totalAsset.base}{market.totalAsset.elastic}

Fraction

Share

Amount

Part

parts=amountmarketaccrued.totalBorrow.basemarketaccrued.totalBorrow.elasticparts = amount * \frac{market_{accrued}.totalBorrow.base}{market_{accrued}.totalBorrow.elastic}

Part

Amount

parts=amountmarketaccrued.totalBorrow.elasticmarketaccrued.totalBorrow.baseparts = amount * \frac{market_{accrued}.totalBorrow.elastic}{market_{accrued}.totalBorrow.base}

Translation to/from part have to be done on the totalBorrow after applying accrual of interest.

Configuration/Constants

The first masterContract released is a market for medium risk assets, with the following parameters set:

Parameter

Value

Collaterization Rate

75%

Collaterization Rate (open)

77%

Target utilization

70%-80%

Starting Interest Rate

1% APR

Minimum Interest Rate

0.25% APR

Maximum Interest Rate

1000% APR

Liquidation Bonus

12%

Protocol Fee (on interest and closed liquidations)

10%

Borrow Opening Fee

0.05%