Shadow: a Cross-chain Interest Rate Market (or, cross-chain yield farming)

Kitten Finance
3 min readMay 14, 2021

Kitten.finance focuses on DeFi innovation. Shadow is our latest invention, which can work as a cross-chain bridge for any blockchains supporting smart contracts.

As its first application, here we show it is possible to deposit token on ETH, and claim farming rewards on Polygon (Matic), to significantly save gas for everyone. Moreover, it can be used to create an interest rate market.

Guide for users:

  1. Switch Metamask to ETH Ropsten.
  2. Open https://www.kitten.finance/new and switch to ETH Ropsten.
  3. Deposit TestCoin or Ropsten ETH to the contract. You can withdraw them at any moment. Everything is gas efficient.

4. Validators will periodically scan all deposit & withdraw events, and issue ‘claims’ for you to mint ksToken (kittenShadowToken).

5. Switch MetaMask and KittenFinance to Polygon Testnet:

6. Click [Check status] for the token. When you see claims, click them to mint ksToken on Polygon Testnet. Everything happens on Polygon, so very cheap in terms of gas.

Note here ksToken is minted using a fixed ‘120% APY’. That is, if you deposit 1 TOKEN to the contract, you will receive 0.1 ksToken every month.

Therefore, the value of 1 ksTOKEN is different for different TOKEN.

The simplified pricing formula (not taking into account of total supplies):

where i_TOKEN is the risk-free interest rate (APY%) of TOKEN.

Hence we can construct an interest rate market using the exchange rate of different ksX and ksY:

Guide for validators:

  1. We are testing the contract, so there is no collateral requirement. Simply deposit 0.042 Ropsten ETH in one tx to the contract and I will add you as a validator when I see such tx.
  2. Switch MetaMask and KittenFinance to ETH Ropsten.
  3. Find incoming tokens and users using Etherscan (later there will be tools to do everything for you).
  4. Click [Check deposit] for the token and the user:

3. Switch MetaMask and KittenFinance to Polygon Testnet.

4. Click [Check claim] for the token and the user:

5. A new claim is auto-filled. Click [Sign claim] to send it. Now the user can see this claim and use it to mint ksToken.

Note you can change the numbers to sign a false claim. However if you do this in the real contract, other validators can send your false claim to the mainnet contract verifier, which will then slash your collateral.

We are Kitten.Finance ( https://www.kitten.finance/ ) and we are working on multiple DeFi products (lending, swap, option, vaults and more) and our own L2 solutions.

Our twitter is https://twitter.com/KittenFinance , and our telegram is https://t.me/kitten_finance_group .

--

--