Shadow: a Cross-chain Interest Rate Market (or, cross-chain yield farming)
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:
- Switch Metamask to ETH Ropsten.
- Open https://www.kitten.finance/new and switch to ETH Ropsten.
- 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:
- To add Polygon Testnet to MetaMask: https://docs.matic.network/docs/develop/metamask/config-matic/
- To get Testnet MATIC: https://faucet.matic.network/
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:
- 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.
- Switch MetaMask and KittenFinance to ETH Ropsten.
- Find incoming tokens and users using Etherscan (later there will be tools to do everything for you).
- 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 .