New Features
1.Action Events
-
XFactory
event StartStrategy( uint256 productID, // The NFT ID of Product. When checking the owner of the NFT, this ID will be used. address productAddr, // The Address of Product. uint256 srcID, // The ID of handler to deposit uint256 dstID, // The ID of handler to borrow uint256 collateralAmount, // The amount of token required when creating a position in BIFI-X. uint256 flashloanAmount, // The amount borrowed via flashloan for leverage, When creating a position in BIFI-X. uint256 lendingAmount, // The amount of borrow. This amount is borrowed to pay off flashloan amount. uint256 timestamp); // The timestamp of StartStrategy action. event EndStrategy( uint256 productID, // The NFT ID of Product. When checking the owner of the NFT, this ID will be used. address productAddr, // The Address of Product. uint256 srcID, // The ID of handler to deposit uint256 dstID, // The ID of handler to borrow uint256 depositAmount, // The amount of deposit. uint256 flashloanAmount, // The amount borrowed to pay off the loan through flashloan, When closing a position in BIFI-X. uint256 timestamp); // The timestamp of EndStrategy action. event LockPositionSwap( uint256 productID, // The NFT ID of Product. When checking the owner of the NFT, this ID will be used. address productAddr, // The Address of Product. uint256 swapAmount, // The amount of swap. address[] path, // The path of swap (An array of token addresses). uint256 timestamp); // The timestamp of LockPositionSwap action. event UnlockPositionSwap( uint256 productID, // The NFT ID of Product. When checking the owner of the NFT, this ID will be used. address productAddr, // The Address of Product. uint256 outAmount, // The amount of tokens when exchanging tokens. uint256 amountInMax, // The maximum amount of token to be exchanged when exchanging tokens. address[] path, // The path of swap (An array of token addresses). uint256 timestamp); // The timestamp of UnlockPositionSwap action. event ExtraPayback( uint256 productID, // The NFT ID of Product. When checking the owner of the NFT, this ID will be used. address productAddr, // The Address of Product. address tokenAddr, // the Address of token. uint256 amount, // the amount to send remaining assets when creating or closing a position. address recipient, // the Address of recipient. uint256 timestamp); // The timestamp of ExtraPayback action.
-
Standard Strategy
event Create( uint256 strategyID, // The ID to identify strategy logic contracts uint256 productID, // The NFT ID of Product. When checking the owner of the NFT, this ID will be used. address positionAddr, // The Address of Product. address userAddr); // The Address of the user who created the product. event PayFee( address userAddr, // The Address of the user who created the product. uint256 feeAmount); // The amount of BIFI token you pay to create a product event WithdrawFee( address receiver, // The Address of the receiver. uint256 feeAmount); // The amount of BIFI token to be withdrawn.
2. Standard Strategy
- Support the Earn and Bet strategies
- Earn : maximizes the profit from reward tokens (i.e., BiFi) by leverages loans.
- Bet (Long) : expecting bullish markets, leverages the crypto-asset deposit holdings (with borrowing stable coins).
- Bet (Short) : preparing the price drop of crypto assets, leverages the crypto-asset loan (by depositing stable coins and borrwing crypto assets).
- Support BiFi Flashloan
- Support UniswapV2
3. Fee Model
The fee model is changed for BiFi-X users to pay BiFI tokens when creating Product contracts. The fee is discounted depending on the owner's (msg.sender) balance of the BiFi token.
4. NFT Ownable
The ownership of a position is represented by a BiFi Position NFT Token.
Addresses
{
"PositionStorage": "0x836C3aFe6104066da3b2d3C244f66d6698623ba9",
"ERC721": "0x3AFF7B16489Fcc59483DE44e96Bd9Ec533915924",
"XFactoryLogic": "0xDdABBfFBbFaa1bed070f3a6Deb6033f94D8c8F26",
"StrategyLogic": "0x9A78496384BA40801B0bf1c2ca4FEb4d1205324a",
"XFactory": "0x97ae437EdBACA2DB40CfF2E0436B894Ff72988AF",
}