Collateral Accounting
This section provides a deep understanding of how the accounting of collateral is done in the BookKeeper contract.
Where is a position's collateral recorded?
mapping(bytes32 => mapping(address => Position)) public positions;struct Position {
uint256 lockedCollateral; // Locked collateral inside this position
uint256 debtShare;
}How is a position's collateral recorded?
mapping(bytes32 => mapping(address => uint256)) public collateralToken;Last updated