Context
Bitcorn (BTCN) is the gas token of the Corn network. On Ethereum, BTCN can be created by new sources as determined by governance. However, on Corn, due to the restrictions of the Arbitrum Orbit chains, minting and burning the gas token is not possible.
Instead, we’ll let the governance-approved addresses borrow Bitcorn from the pre-minted supply stored in the BTCN OFT contract. This enables the following use cases:
- Flash loans, creating and improving the arbitrage opportunities on Corn and contributing to the stability of the BTCN’s price.
- Lending markets, where users are able to borrow BTCN against their collateral. Morpho was chosen as the first instance of this flow.
- Permissioned minting for custodians, for borrowing stables against BTC collateral. The Corn team is talking to Tether and planing to have USDT0 natively deployed on the chain.
Scope
Wonderland will:
- Prepare a smart contract upgrade adding the functions for borrowing and repaying BTCN on the Corn chain, as well as settings global and per-module limits.
- Consider removing the unused ERC20 functionality from the OFT token, such as total supply, deposit, withdraw.
- Develop a flash loan module.
- Address Cantina feedback regarding one of the Governor contracts.
- Deprecate
AuthNoOwner
in favor of an upgradeable version of solmate’s Auth
.
- Set up best practices in the repository, fix failing tests, implement linting.
- Research possible ways to enable the “borrow USD against BTC collateral” use case and do the groundwork to ensure a future integration can be developed ASAP.
- Built any necessary off-chain parts to simplify interactions with the modules and monitoring.
Estimations
The project will require 1-2 Solidity and one off-chain developer. We anticipate the upgrade to be straightforward and take up to 2 weeks of development and testing time. Up to 2 weeks will be spent on developing the flashloan module. These estimates do not take into consideration the security procedures, such as internal reviews and 3rd party audits. The off-chain parts will take up to 4 weeks.
It’s important to note that some phases of the project can overlap. These are rough estimates and we’ll provide a refined timeline after the completion of the tech design.
Signatures