Protocol / the vault
One vault.
One swarm.
Near_Beetle is a native-NEAR yield vault. You hold shares. A keeper, the swarm, moves the capital between whitelisted strategies. The contract enforces the limits on everyone.
The beetle engine
Automated
capital movement.
Near_Beetle turns the repetitive parts
of yield management into protocol infrastructure.
-
Automated routing
Move capital through predefined on-chain strategies without manual management.
-
Harvesting
Collect available strategy rewards according to protocol logic.
-
Compounding
Put eligible rewards back to work.
-
Strategy management
A structured layer between users and supported NEAR DeFi strategies.
-
On-chain transparency
Strategy activity and protocol interactions remain verifiable on NEAR.
Who does what
Three roles.
One contract.
You deposit.
The swarm moves.
The owner sets the map.
-
User
Holds the shares.
Deposits NEAR and receives vault shares at the current share price. Burns shares to take NEAR back out. Nobody else can move a user’s shares.
- deposit()
- withdraw(shares)
-
Keeper / the swarm
Moves the capital.
Shifts NEAR between idle liquidity and whitelisted strategies, and reports yield. It cannot add a strategy, change a target, or touch the fee.
- deploy
- recall
- harvest
- rebalance
-
Owner
Sets the map.
Curates the strategy whitelist and target allocations, names the keeper, sets the fee under its cap, and can pause. Every owner call needs 1 yoctoNEAR attached, so a function-call access key can’t make it.
- add_strategy
- update_strategy
- set_keeper
- pause
Share accounting
Your slice
of the nest.
A deposit mints shares at the current exchange rate between total assets and total shares. The first depositor gets shares 1:1, so one share starts out worth one NEAR.
Harvested yield raises total assets without minting shares for depositors. Your share count stays the same; each share is worth more.
Both conversions round down, in favour of the vault, so a deposit followed by a withdrawal can never create value.
// A = total assets, S = total shares
// deposit: NEAR → shares
shares = assets * (S + 1) / (A + 1)
// withdraw: shares → NEAR
assets = shares * (A + 1) / (S + 1)
// share price, per 1e24 shares
get_share_price() // starts at 1 NEAR
Guard rails
Limits written
into the shell.
These are constants and checks in the contract,
not promises on a web page.
- Fee capped at 20%The performance fee applies to harvested yield only and cannot be set above 2,000 bps. It is minted as shares to the fee recipient.
- Allocation capsA deploy cannot push a strategy above its target share of total assets. Targets across enabled strategies never sum above 100%.
- Withdrawals stay openPausing blocks deposit, deploy and rebalance. Withdraw, recall and harvest keep working.
- Donation-proof priceIdle NEAR is tracked internally. Sending NEAR straight to the contract does not move the share price.
- Minimum deposit 0.01 NEARTogether with a virtual share offset, this makes share-inflation attacks uneconomical.
- Failed payouts roll backIf a withdrawal transfer fails, the burned shares are restored and a
withdraw_refundedevent is logged. - At most 20 strategiesKeeps rebalance and the views bounded in gas.
- Trust, stated plainlyThe owner controls the whitelist and the keeper. The contract is unaudited: testnet only until that changes.
