Integration Guideline
This page provides a high-level guide on integrating with Wombat on various projects.
You will want to use the
Router
contract. To get a quote, use getAmountOut
. To swap BEP20 tokens, use swapExactTokensForTokens
. Each swap in the path will incur a haircut fee, which can differ for each pool.Then, use
MasterWombat
's getAssetPid
to find the id of the asset. Use the id to deposit
the LP tokens into MasterWombat. Alternatively, you may set the param shouldStake
to be true while callingPool.deposit
(This feature is experimental. Please use it with caution).After the deposit, you may use
pendingTokens
to check for any pending rewards. Note that there may be more than one reward token. To claim rewards, you can either do a deposit
(with zero amount), withdraw
(with zero amount), or call multiClaim
to claim one or more positions.The withdrawal flow is similar to the above in reverse.
You may call VeWom.mint to lock WOM into the contract and mint veWOM with a length of 7 days to 1461 days. Up to 10000 positions could be locked for each user. To view locked positions, call VeWom.getUserInfo. After the locking period, call VeWom.burn to burn veWOM and get back locked WOM.
Last modified 4mo ago