Alpaca Finance
搜索文档…
简体中文
🦙
Alpaca Finance
项目协议介绍
🏆
我们的产品
📈
如何参与
🗺
发展路线图
🔒
安全
📄
项目透明信息(审计 & 合约)
🔗
其他链接
📰
媒体报导
❤
慈善
🌐
全局变量
代币经济学模型
📀
ALPACA 代币
💰
ib 代币 / 合成代币
⚖
资金池分配
🔥
代币销毁证明
贷款
🏦
贷款简介
❗
风险
⏭
手把手教学
杠杆收益农场
🚀
杠杆收益农场简介
🏊
资金池具体参数
🧮
杠杆收益农场交易策略
🌊
清算
❗
风险
📶
手把手引导教学
自动化金库
⚙
自动化金库简介
🔏
专属自动化金库
📈
回测结果
❗
风险
⏭
手把手引导教学
AUSD
💵
AUSD 简介
💹
如何参与
⏭
手把手引导教学
💦
AUSD 清算
〰
AUSD 价格稳定模块
❗
风险
社区治理
🗳
治理资金池
🍃
羊驼牧场 (新)
⚡
提前取款
🗒
羊驼改进提案 (AIP) 细节
⏭
手把手引导教学
📷
论坛和快照
加入羊驼群!(ALPACAREERS)
🚀
我们正在招聘!
ALPIES
🌗
Alpies 简介
🧑🏫
桥接您的 Alpies
资源
👩🏫
羊驼学院
❓
FAQ
🧰
实用工具
📘
术语和计算方法
⚠
常见错误信息
💸
第三方的 ALPACA 收益机会
开发
🐞
漏洞赏金计划
🎛
协议相关配置信息
💻
与 Alpaca Finance 集成
过去的产品
💪
Stronk 资金池 / 资金库
🌿
羊驼牧场 (旧)
由
GitBook
提供支持
🎛
协议相关配置信息
🖌
设计理念
我们在Alpaca Finance中设计了许多可配置的参数。虽然最初的参数配置是由核心开发人员来设定的,但我们已经计划来让治理社区通过投票的方式,来决定是否更改配置参数。
⏳
时间锁
时间锁 Timelock 是一个延迟本项目更改生效的智能合约。这个时间锁合约,是 Alpaca Finance 项目上所有合约的拥有者(owner)。因此,每一次合约变更生效都需要通过这个时间锁合约,使得时间锁合约作为
护城河
来保障资金安全。
本质上,管理员(团队核心开发人员)每一次的操作都需要通过这个时间锁合约,并且操作都是
24小时后
才生效。具体来说,管理员执行的每个命令就像一笔订单一样排队进入队列,然后等待24小时候才会执行。这是一个可靠的安全特性,使社区能够提前看到所有合约更新操作,并提前做好准备。如果发现有任何可疑操作的地方,用户可以在合约升级生效前,从资金池里提取他们的资金。
下面的这些合约拥有者都是时间锁合约
所有的资金池合约
公平发行合约
所有的系统运行合约
所有价格预言机合约
所有系统配置合约
⚙
可调参数
本节列出了 Alpaca Finance 项目中所有可调参数和函数
FairLaunch Contract / 公平发行合约
addPool(_allocatedPoint, _stakeToken, _withUpdate)
_allocatedPoint = How many points assign to this pool. This will affect the ALPACAs distribution per block.
_stakeToken = The address of a required staking token.
_withUpdate = A flag for updatePool calculation
setPool(_pid, _allocatedPoint, _withUpdate)
_pid = Pool ID that you wish to adjust the point
_allocatedPoint = New points to be assign to this pool. This will affect the ALPACAs distribution per block.
_withUpdate = A flag for updatePool calculation
setBonus(_bonusMultiplier, _bonusEndBlock, _bonusLockUpBps)
_bonusMultiplier = Multiplier that will be applied during the bonus period
_bonusEndBlock = The block number that bonus will be ended
_bonusLockUpBps = % of bonus that is earned in the bonus period to be locked
Vault Contract / 资金池合约
updateConfig(_newConfig)
_newConfig = A new contract that is implemented IVaultConfig interface
setFairLaunchPoolId(_pid)
_pid = Pool ID on Fair Contract that the staking token is debtToken owned by Vault
withdrawReserve(_to, _amount)
_to = The address to receive amount
_amount = The amount to be withdrawn from the reserve
redeuceReserve(_amount)
_amount = Reduce reserve portion for treasury management
PancakeswapWorker Contract / PancakeswapWorker 合约
setReinvestBountyBps(_newBountyBps)
_newBountyBps = A new bounty that the bounty hunter will get when they trigger reinvest
setStrategyOk(_strategyAddresses, _ok)
_strategyAddresses = Addresses for the strategy contract
_ok = Can be either true or false. If the _strategyAddresses above need to be disabled then set _ok = false
setCriticalStrategies(_addStrategy, _liquidateStrategy)
_addStrategy = Set default addStrategy
_liquidateStrategy = Set default liquidateStrategy
SimplePriceOracle Contract / 价格预言机合约
setFeeder(_address)
_address = The address of a new feeder
SimpleVaultConfig
setParams(_minDebtSize, _interestRate, _reservePoolBps, _killBps, _wrappedNative, _fairLaunch)
_minDebtSize = The minimum required for borrower to loan from the pool
_interestRate = Interest rate per second
_reservePoolBps = % to be put in reserve pool in BPS
_killBps = % that bounty hunters will get when they liquidate the position
_wrappedNative = Address of the wNative token
_fairLaunch = Address of the fair launch contract
setWorker(_workerAddress, _isWorker, _acceptDebt, _workFactor, _killFactor)
_workerAddress = The address of the worker
_isWorker = The flag to set if this is worker
_acceptDebt = The flag to set if this worker is accepting the debt
_workFactor = The flag threshold to prevent user from over leverage
_killFactor = The flag threshold to mark if position can be liquidated
ConfigurableInterestVaultConfig
setParams(_minDebtSize, _reservePoolBps, _killBps, _interestModelAddress, _wrappedNative, _fairLaunch)
_minDebtSize = The minimum required for borrower to loan from the pool
_reservePoolBps = % to be put in reserve pool in BPS
_killBps = % that bounty hunters will get when they liquidate the position
_interestModelAddress = Address of the interest model
_wrappedNative = Address of the wNative token
_fairLaunch = Address of the fair launch contract
PancakeswapWorkerConfig
setOracle(_newOracleAddress)
_newOracleAddress = The new oracle address
setConfigs([ ]_WorkerAddress, [ ]_configs)
[ ]_WorkerAddress = address of worker
[ ]_configs = Config object including:
_acceptDebt
_workFactor = The flag threshold to prevent user from over leverage
_killFactor = The flag threshold to mark if position can be liquidated
_maxPriceDiff
开发 - 以前
漏洞赏金计划
下一个 - 开发
与 Alpaca Finance 集成
最近更新
8mo ago
复制链接
内容
设计理念
时间锁
可调参数
FairLaunch Contract / 公平发行合约
Vault Contract / 资金池合约
PancakeswapWorker Contract / PancakeswapWorker 合约
SimplePriceOracle Contract / 价格预言机合约
SimpleVaultConfig
ConfigurableInterestVaultConfig
PancakeswapWorkerConfig