Dapp:代表去中心化应用程序。它们是在去中心化网络或区块链上运行后端代码(主要用Solidity编写的智能合约)的应用程序。可以使用React、Vue或Angular等前端框架构建Dapp。
从本质上看,区块链是以分布式数据存储、点对点传输、共识机制、加密算法、,智能合约等计算机技术集成创新而产生的分布式账本技术,It is an Internet based Distributed database,featuring decentralization,consensus mechanism,tamper proof,traceability,transparent rules,etc,
区块链是分布式数据存储、点对点传输、共识机制、加密算法等计算机技术的新型应用模式。
if(flippedLower){
tickBitmap.flipTick(tickLower,tickSpacing);
secondsOutside.initialize(tickLower,tick,tickSpacing,blockTimestamp);
}
if(flippedUpper){
tickBitmap.flipTick(tickUpper,tickSpacing);
secondsOutside.initialize(tickUpper,tick,tickSpacing,blockTimestamp);
}
function update(
mapping(int24=>Tick.Info)storage self,
int24 tick,
int24 tickCurrent,
int128 liquidityDelta,
uint256 feeGrowthGlobal0X128,
uint256 feeGrowthGlobal1X128,
bool upper,
uint128 maxLiquidity
)internal returns(bool flipped){
Tick.Info storage info=self[tick];
uint128 liquidityGrossBefore=info.liquidityGross;
uint128 liquidityGrossAfter=LiquidityMath.addDelta(liquidityGrossBefore,liquidityDelta);
require(liquidityGrossAfter<=maxLiquidity,'LO');
//通过liquidityGross在进行position变化前后的值
//来判断tick是否仍被引用
flipped=(liquidityGrossAfter==0)!=(liquidityGrossBefore==0);
...
info.liquidityGross=liquidityGrossAfter;
//更新liquidityNet的值,对于upper tick,
info.liquidityNet=upper
?int256(info.liquidityNet).sub(liquidityDelta).toInt128()
:int256(info.liquidityNet).add(liquidityDelta).toInt128();
}