# Milestone 1: Implement Ethereum Mainnet Version ($10,000)

* Implementation has to pass margin trading tests successfully on a fork-based test using forge

* Available trade types:
  - Open (Borrow->Swap->Deposit)
  - Collateral Swap (Withdraw->Swap->Deposit)
  - Debt Swap (Borrow->Swap->Repay)
  - Close (Withdraw->Swap->Repay)

* The implementation has to work for multiple Venus markets at in the same contract and must not require a smart contract upgrade in case Venus launches additional markets

* Swap variations:
  - Flash Loan-based swaps
  - Flash Swaps (e.g. with Uniswap V3), these are more cost efficient than traditional flash loans 


#	Milestone 2: Provide Typescript SDK ($5,000)

* Create an SDK that allows creating calldata for the margin trade actions

* Native routing for flash swaps as well as generic swap aggregator calldata as inputs


# Milestone 3: Deploy Smart Contracts to Ethereum and integrate it into 1delta UI ($7,500)

* Deploy the contracts on Ethereum Mainnet and integrate them into our app: https://app.1delta.io/

* All markets (Core & ETH market) will be integrated  


#	Milestone 4: Extend Smart Contracts and Tests to BNB Chain ($5,000)

* Create the smart contracts for BNB Chain markets

* Write tests for the margin operations


# Milestone 5: Deploy Smart Contracts to BNB Chain 

* Mainnet and integrate them into the 1delta UI ($10,000)
* Deploy to BNB Chain and integrate all 6 markets into 1delta UI

**Total grant request:** $30,000
