LogoLogo
▶️ App🔩 Sources🔒 Audit💬 Community
Octus Bridge (EN)
Octus Bridge (EN)
  • 🏠Welcome to Octus Bridge
  • 💻USE
    • 🚀Getting started
      • How it works
        • Cross-chain transfers
        • Governance
        • Relayers
        • Staking
      • Roles
      • How to connect wallets
      • Glossary
      • Everscale
      • How to get EVER
    • 🌉Bridge
      • Cross-chain transfer
        • Interface
        • How to
          • Transferring from another network to Everscale
          • Transferring between two outside networks
          • Find my transaction
          • How to return the transfer fee
      • Liquidity requests
      • History
        • Interface
          • Transfer rates
          • All transfers
      • Concepts
        • How Octus Bridge transfers work
        • Available chains and assets
        • Universal Bridge
        • Invisible Bridge
    • 💰Staking
      • My stake
        • Interface
          • My staking performance
          • My staking balance
          • User stake
          • Reward rounds
          • Transactions
        • How to
          • How to Stake
          • How to Claim
          • How to Redeem
      • Explorer
        • Interface
          • Explorer
          • Stakeholders
      • Concepts
        • About Octus Bridge Staking
        • How does Staking work?
    • 🗳️Governance
      • Overview
        • Interface
          • DAO overview
          • Recent proposals
          • TOP voters by voting power
      • Proposals
        • Interface
          • My votes
          • Proposals with my votes
          • Governance proposals
        • How to
          • How to Vote
      • Create proposals
        • Interface
        • How to
          • How to create a proposal
      • Concepts
        • Bridge DAO
        • BRIDGE token
        • BRIDGE economics
        • Proposals
        • Get BRIDGE Tokens
    • ⛓️Relayers
      • How to
        • How to become a relayer
      • Concepts
        • Octus Bridge relayers
    • 📜Litepaper
  • 🛠️Integrate
    • Octus Bridge Integration Guide
    • Octus Bridge Contracts
      • Everscale
        • Bridge section
          • event-configuration-contracts
          • event-contracts-base
          • event-contracts-dao
          • event-contracts-multivault
          • event-contracts-staking
          • event-contracts-token-transfer
          • Factory
          • Bridge
          • Connector
        • DAO Section
          • DAORoot
          • Proposal
        • Staking Section
          • Base
          • Elections
          • Encoder
          • RelayRound
          • Staking
          • StakingV1_1
          • StakingRootDeployer
          • UserData
        • Utils Section
          • Delegate
          • DummyRound
          • Receiver
      • Ethereum
        • Bridge Section
          • Bridge
          • StakingRelayVerifier
        • MultiVault Section
          • MultiVault
          • MultiVaultToken
        • Strategies Section
          • BaseStrategy
          • Convex3crv
          • ConvexAIEth
          • ConvexCrvLp
        • Vault Section
          • Vault
        • DAO
        • Registry
    • Bridge Relay Node
    • Token Contracts
    • Open API
      • Bridge API
        • Relayers
        • DAO
        • Staking
        • Transfers
      • DAO API
        • Proposals
        • Voters
        • Votes
  • see also
    • FlatQube
    • EVER Wallet
    • Broxus Github
Powered by GitBook
On this page

Was this helpful?

  1. Integrate
  2. Octus Bridge Contracts
  3. Ethereum
  4. Strategies Section

BaseStrategy

harvestTrigger

Provides a signal to the keeper that harvest() should be called. The keeper will provide the estimated gas cost that they would pay to call harvest() and this function should use that estimate to make a determination if calling it is "worth it" for the keeper.

function harvestTrigger(uint256 callCost) public virtual view returns (bool)

Parameters:

Name
Type
Description

callCost

uint256

Amount of cost for calling harvest()

Return value:

Type
Description

bool

True if harvest() should be called, false if otherwise

harvest

Harvests the Strategy, recognizing any profits or losses and adjusting the Strategy's position.

function harvest() external virtual onlyKeepers

Events emitted:

  • Harvested(profit, loss, debtPayment, debtOutstanding)

withdraw

Withdraws _amountNeeded to vault

function withdraw(uint256 _amountNeeded) external virtual returns (uint256 _loss)

Parameters:

Name
Type
Description

_amountNeeded

uint256

Amount of tokens to withdraw

Return value:

Name
Type
Description

_loss

uint256

Any losses created while liquidating tokens

prepareMigration

Do anything necessary to prepare this Strategy for migration, such as transferring any reserve or LP tokens, CDPs, or other tokens or stores of value.

function prepareMigration(address _newStrategy) internal virtual

Parameters:

Name
Type
Description

_newStrategy

address

New strategy’s vault address

migrate

Transfers all want tokens from this strategy to a new strategy. Can only be called by the governance or the vault.

function migrate(address _newStrategy) external

Parameters:

Name
Type
Description

_newStrategy

address

New strategy’s vault address

sweep

Removes tokens from this Strategy that are not the type of tokens managed by this Strategy.

function sweep(address _token) external virtual onlyGovernance

Parameters:

Name
Type
Description

_token

address

Address of token to transfer out of this strategy’s vault

Events emitted:

  • IERC20Upgradeable(_token).safeTransfer(governance(), IERC20Upgradeable(_token).balanceOf(address(this)))

PreviousStrategies SectionNextConvex3crv

Last updated 2 years ago

Was this helpful?

🛠️