🎛️Pagsasaayos ng Protocol
🖌️ Design Ethos
Kami ay nagdisenyo ng maraming mga parameter sa Alpaca Finance upang mai-configure. Habang ang mga paunang pagsasaayos ay itinakda ng pangkat ng pangunahing developer, mayroon kaming bawat hangarin na hayaan ang pamayanan ng Pamamahala na magpasya kung ano ang kailangang baguhin na mangyayari sa pamamagitan ng pagboto.
⏳ Timelock
Ang Timelock ay isang kontrata para sa pagkaantala ng mga pagbabago sa protocol. Ang kontrata na ito ay isang may-ari ng lahat ng mga pangunahing kontrata sa Alpaca Finance. Samakatuwid, ang bawat pagbabago ay kailangang isagawa sa pamamagitan ng kontratang ito, na pinapagana bilang isang security moat.
Sa esensya, ang bawat order mula sa admin (ang pangkat ng mga pangunahing developer) ay kailangang dumaan sa kontrata na ito, ito rin ay nadedelay sa loob ng 24 na oras bago ipatupad. Upang maging tiyak, ang utos ng pagpapatupad para sa order ay pupunta sa pila, naghihintay na maisakatuparan kapag ang pagkaantala ng 24h ay naipasa. Ito ay isang tampok na seguridad na nagbibigay-daan sa komunidad upang makita ang anumang paparating na mga update at maghanda nang maaga para sa kanila. Kung may anumang mukhang kahina-hinala, maaari nilang hilahin ang kanilang mga pondo mula sa protocol bago maganap ang pag-update.
Nasa ibaba ang mga kontrata na pag-aari ng Timelock
All Vault Contracts
FairLaunch Contract
All Worker Contracts
All PriceOracle Contracts
All WorkerConfig Contracts
⚙️ Adjustable Parameters
This section lists all adjustable parameters and functions in 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
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, aka liquidation threshold
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, aka liquidation threshold
_maxPriceDiff
Last updated